Don't start two pane for singleInstance deep links
If the activity's launch mode is "singleInstance", it can't be embedded in Settings since it will be created in a new task. Bug: 229371407 Test: adb shell am start -a android.settings.NETWORK_OPERATOR_SETTINGS Change-Id: I1689d860151182cd9e97d9e4fd65d30a8804a570
This commit is contained in:
@@ -466,6 +466,15 @@ public class SettingsActivity extends SettingsBaseActivity
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If the activity's launch mode is "singleInstance", it can't be embedded in Settings since
|
||||||
|
// it will be created in a new task.
|
||||||
|
ActivityInfo info = intent.resolveActivityInfo(getPackageManager(),
|
||||||
|
PackageManager.MATCH_DEFAULT_ONLY);
|
||||||
|
if (info.launchMode == ActivityInfo.LAUNCH_SINGLE_INSTANCE) {
|
||||||
|
Log.w(LOG_TAG, "launchMode: singleInstance");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (intent.getBooleanExtra(EXTRA_IS_FROM_SLICE, false)) {
|
if (intent.getBooleanExtra(EXTRA_IS_FROM_SLICE, false)) {
|
||||||
// Slice deep link starts the Intent using SubSettingLauncher. Returns true to show
|
// Slice deep link starts the Intent using SubSettingLauncher. Returns true to show
|
||||||
// 2-pane deep link.
|
// 2-pane deep link.
|
||||||
|
Reference in New Issue
Block a user