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

Commit 0f5e75e0 authored by Arc Wang's avatar Arc Wang
Browse files

[Large sceen] Don't go Settings 2-pane deep link flow if not task root

When a full screen or a non-Settings-app ActivityA starts ActivityB of
a SettingsActivity, splitInfos will be empty and it unexpectedly goes
Settings 2-pane deep link flow.

This change checks if an Activity is not task root, don't go Settings
2-pane deep link flow.

Bug: 205497007
Test: manual
      SUW -> Vision settings
      Check if it goes Settings 2-pane deep link flow.
Change-Id: I0822fbe71fdde47ce7c070986371a4dfea84992c
parent 15f9ce95
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -370,8 +370,9 @@ public class SettingsActivity extends SettingsBaseActivity
        final SplitStateObserver splitStateObserver = new SplitStateObserver(this /* activity*/,
                true /* listenOnce */,
                splitInfos -> {
                    if (!splitInfos.isEmpty()) {
                        // It's already in 2-pane and no need to go 2-pane deep link flow.
                    if (!splitInfos.isEmpty() || !SettingsActivity.this.isTaskRoot()) {
                        // It's already in 2-pane or in a non-empty task, there is no need to go
                        // 2-pane deep link flow.
                        return;
                    }