Make MD Launcher start a new task when launching app by default

We want to make MD launcher have the similar behaviors as other
launchers, which is start a new task by default.

Fixes: 119634726
Test: Manual - launch EditTextVariation and click home button
Change-Id: I862557c1ac41ce4d259ebe45394eb503065e1fa0
This commit is contained in:
Charles Chen
2018-11-19 15:32:14 +08:00
parent 59ff9d98cc
commit 24c88f07ae

View File

@@ -189,9 +189,9 @@ public class LauncherActivity extends FragmentActivity implements AppPickedCallb
}
void launch(Intent launchIntent) {
launchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
if (mNewInstanceCheckBox.isChecked()) {
launchIntent.addFlags(
Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
launchIntent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
}
final ActivityOptions options = ActivityOptions.makeBasic();
if (mSelectedDisplayId != Display.INVALID_DISPLAY) {