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

Commit 48841576 authored by Simon Wingrove's avatar Simon Wingrove
Browse files

Don't trampoline twice when opening security or privacy

Settings already trampolines to a two-pane version of deeplink
activities, doing another trampoline will wind up creating a second task
covering up the first, with the wrong layout.

Bug: 253554698
Test: manually
Change-Id: Ib7ba5c95cac2f644ade37a41f321d11c8f1d1b89
parent 236eaed3
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -152,6 +152,11 @@ public class Settings extends SettingsActivity {
        /** Redirects to SafetyCenter if enabled. */
        @VisibleForTesting
        public void handleSafetyCenterRedirection() {
            if (isFinishing()) {
                // Don't trampoline if already exiting this activity.
                return;
            }

            if (SafetyCenterManagerWrapper.get().isEnabled(this)) {
                try {
                    startActivity(new Intent(Intent.ACTION_SAFETY_CENTER));
@@ -213,6 +218,11 @@ public class Settings extends SettingsActivity {
        /** Redirects to SafetyCenter if enabled. */
        @VisibleForTesting
        public void handleSafetyCenterRedirection() {
            if (isFinishing()) {
                // Don't trampoline if already exiting this activity.
                return;
            }

            if (ACTION_PRIVACY_SETTINGS.equals(getIntent().getAction())
                    && SafetyCenterManagerWrapper.get().isEnabled(this)) {
                try {