Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd6107d1 authored by Jason Chiu's avatar Jason Chiu Committed by Android (Google) Code Review
Browse files

Merge "Don't start two pane for singleInstance deep links" into tm-dev

parents fa5407c6 0c732f2a
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -466,6 +466,15 @@ public class SettingsActivity extends SettingsBaseActivity
            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)) {
            // Slice deep link starts the Intent using SubSettingLauncher. Returns true to show
            // 2-pane deep link.