[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
This commit is contained in:
@@ -370,8 +370,9 @@ public class SettingsActivity extends SettingsBaseActivity
|
|||||||
final SplitStateObserver splitStateObserver = new SplitStateObserver(this /* activity*/,
|
final SplitStateObserver splitStateObserver = new SplitStateObserver(this /* activity*/,
|
||||||
true /* listenOnce */,
|
true /* listenOnce */,
|
||||||
splitInfos -> {
|
splitInfos -> {
|
||||||
if (!splitInfos.isEmpty()) {
|
if (!splitInfos.isEmpty() || !SettingsActivity.this.isTaskRoot()) {
|
||||||
// It's already in 2-pane and no need to go 2-pane deep link flow.
|
// It's already in 2-pane or in a non-empty task, there is no need to go
|
||||||
|
// 2-pane deep link flow.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user