Bug 1280112 - LauncherActivity: Remove task flags from incoming intent. r?ahunt
MozReview-Commit-ID: 8ufNtiMc1sj
--- a/mobile/android/base/java/org/mozilla/gecko/LauncherActivity.java
+++ b/mobile/android/base/java/org/mozilla/gecko/LauncherActivity.java
@@ -63,16 +63,22 @@ public class LauncherActivity extends Ac
}
/**
* Launch the browser activity.
*/
private void dispatchNormalIntent() {
Intent intent = new Intent(getIntent());
intent.setClassName(getApplicationContext(), AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS);
+
+ // Explicitly remove the new task and clear task flags (Our browser activity is a single
+ // task activity and we never want to start a second task here). See bug 1280112.
+ intent.setFlags(intent.getFlags() & ~Intent.FLAG_ACTIVITY_NEW_TASK);
+ intent.setFlags(intent.getFlags() & ~Intent.FLAG_ACTIVITY_CLEAR_TASK);
+
startActivity(intent);
}
private void dispatchCustomTabsIntent() {
Intent intent = new Intent(getIntent());
intent.setClassName(getApplicationContext(), CustomTabsActivity.class.getName());
startActivity(intent);
}