[Large screen] SplitListener may not provide correct information
SettingsActivity may send Settings 2-pane deep link Intent to
SettingsHomepageActivity if split callback tells that there is no
SplitInfo.
Wallpaper app sends deep link Intent to SettingsHomepageActivity,
and then SettingsHomepageActivity starts Wallpaper app page.
The flow should be 2-pane organized but the split callback tells
that splitInfos is empty.
This change checks if the Intent is from SettingsHomepageActivity
to prevent the Intent loop by the bug.
Bug: 205206004
Test: manual
Long click Launcher -> Wallpaper & style
Change-Id: I6b9d76c136238e556384e891ae1700ae7c1bb41f
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 226e1de..957efdf 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -451,6 +451,11 @@
return false;
}
+ if (intent.getBooleanExtra(SettingsHomepageActivity.EXTRA_IS_FROM_SETTINGS_HOMEPAGE,
+ /* defaultValue */ false)) {
+ return false;
+ }
+
if (TextUtils.equals(intent.getAction(), Intent.ACTION_CREATE_SHORTCUT)) {
// Returns false to show full screen for Intent.ACTION_CREATE_SHORTCUT because
// - Launcher startActivityForResult for Intent.ACTION_CREATE_SHORTCUT and activity