Set 2-pane placeholder for all alias of SettingsHomepageActivity
SettingsHomepageActivity may be launched by different alias,
this change sets placeholder for all these alias to ensure
placeholder is present.
Bug: 199363383
Test: manual
1. Click Settings icon button in quick setting panel.
2. Launch Settings app deep link, then move it to background,
and the launch Settings app.
Change-Id: I9ba6dbc5cfa2bac51bf53bb21f8983193ba053b6
diff --git a/src/com/android/settings/activityembedding/ActivityEmbeddingRulesController.java b/src/com/android/settings/activityembedding/ActivityEmbeddingRulesController.java
index 9940980..a0f4aad 100644
--- a/src/com/android/settings/activityembedding/ActivityEmbeddingRulesController.java
+++ b/src/com/android/settings/activityembedding/ActivityEmbeddingRulesController.java
@@ -32,6 +32,8 @@
import com.android.settings.Settings;
import com.android.settings.SubSettings;
+import com.android.settings.Utils;
+import com.android.settings.homepage.SettingsHomepageActivity;
import java.util.HashSet;
import java.util.Set;
@@ -89,7 +91,10 @@
private void registerHomepagePlaceholderRule() {
final Set<ActivityFilter> activityFilters = new HashSet<>();
+ activityFilters.add(new ActivityFilter(getComponentName(SettingsHomepageActivity.class)));
activityFilters.add(new ActivityFilter(getComponentName(Settings.class)));
+ activityFilters.add(new ActivityFilter(new ComponentName(Utils.SETTINGS_PACKAGE_NAME,
+ SettingsHomepageActivity.ALIAS_DEEP_LINK)));
final Intent intent = new Intent();
intent.setComponent(getComponentName(Settings.NetworkDashboardActivity.class));
final SplitPlaceholderRule placeholderRule = new SplitPlaceholderRule(
diff --git a/src/com/android/settings/homepage/SettingsHomepageActivity.java b/src/com/android/settings/homepage/SettingsHomepageActivity.java
index 73f0abb..4a0a912 100644
--- a/src/com/android/settings/homepage/SettingsHomepageActivity.java
+++ b/src/com/android/settings/homepage/SettingsHomepageActivity.java
@@ -62,7 +62,7 @@
public static final String EXTRA_IS_FROM_SETTINGS_HOMEPAGE = "is_from_settings_homepage";
// An alias class name of SettingsHomepageActivity.
- private static final String ALIAS_DEEP_LINK = "com.android.settings.DeepLinkHomepageActivity";
+ public static final String ALIAS_DEEP_LINK = "com.android.settings.DeepLinkHomepageActivity";
private static final long HOMEPAGE_LOADING_TIMEOUT_MS = 300;