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

Commit 7317e8ab authored by Hakan Seyalioglu's avatar Hakan Seyalioglu
Browse files

Don't auto-launch if switching to managed account

When the user picks the option to switch to a managed account, avoid
auto-launching the activity if there's only a single activity to pick
from.

Bug: 32669623

Test: Manual
Change-Id: Ieaed5885385929297304506ca2d5839e77043a64
parent 7a5ad264
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -299,6 +299,11 @@ public class ChooserActivity extends ResolverActivity {
                || aInfo.name.equals(IntentForwarderActivity.FORWARD_INTENT_TO_MANAGED_PROFILE)) {
            result = Intent.createChooser(result,
                    getIntent().getCharSequenceExtra(Intent.EXTRA_TITLE));

            // Don't auto-launch single intents if the intent is being forwarded. This is done
            // because automatically launching a resolving application as a response to the user
            // action of switching accounts is pretty unexpected.
            result.putExtra(Intent.EXTRA_AUTO_LAUNCH_SINGLE_CHOICE, false);
        }
        return result;
    }