Add FLAG_ACTIVITY_NEW_TASK when showing permission dialog for GCM, fixes #270

This commit is contained in:
Marvin W 2017-01-15 22:53:17 +01:00
parent a29e759d7a
commit 050a78569d
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A

View File

@ -140,6 +140,7 @@ public class PushRegisterService extends IntentService {
Intent i = new Intent(this, AskPushPermission.class);
i.putExtra(EXTRA_PENDING_INTENT, intent);
i.putExtra(EXTRA_APP, packageName);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
} catch (PackageManager.NameNotFoundException e) {
replyNotAvailable(this, intent, packageName);