[Large screen] Make slice deep linking to Settings show in 2-pane
- add a standalone home activity for slice deep link.
- add EXTRA_IS_FROM_SLICE to control the slice deep link flow.
- Intent#parseUri fails if the intent data schema is set.
Add EXTRA_SETTINGS_LARGE_SCREEN_DEEP_LINK_INTENT_DATA to relay the
data schema.
Bug: 201397123
Test: manual, robotest
1. Say 'Enable NFC'/'Enable Bluetooth'to Google assistant.
2. Click the the NFC/BT Slice.
Change-Id: Ia3216956328c32b2109cb2d70ad1105327661f26
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 8fedf92..af7de00 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -129,7 +129,6 @@
<uses-library android:name="androidx.window.sidecar" android:required="false"/>
<!-- Settings -->
-
<activity android:name=".homepage.SettingsHomepageActivity"
android:label="@string/settings_label_launcher"
android:theme="@style/Theme.Settings.Home"
@@ -145,18 +144,15 @@
android:value="true" />
</activity>
- <activity android:name=".network.telephony.MobileNetworkActivity"
- android:label="@string/network_settings_title"
- android:exported="true"
- android:launchMode="singleTask">
- <intent-filter android:priority="1">
- <!-- Displays the MobileNetworkActivity and opt-in dialog for capability discovery. -->
- <action android:name="android.telephony.ims.action.SHOW_CAPABILITY_DISCOVERY_OPT_IN" />
- <action android:name="android.settings.NETWORK_OPERATOR_SETTINGS" />
- <action android:name="android.settings.DATA_ROAMING_SETTINGS" />
- <action android:name="android.settings.MMS_MESSAGE_SETTING" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
+ <activity android:name=".homepage.SliceDeepLinkHomepageActivity"
+ android:label="@string/settings_label_launcher"
+ android:theme="@style/Theme.Settings.Home"
+ android:taskAffinity=""
+ android:launchMode="singleTask"
+ android:exported="false"
+ android:configChanges="orientation|keyboard|keyboardHidden|screenSize|screenLayout">
+ <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+ android:value="true" />
</activity>
<!-- Alias for launcher activity only, as this belongs to each profile. -->
@@ -234,6 +230,20 @@
android:value="true" />
</activity>
+ <activity android:name=".network.telephony.MobileNetworkActivity"
+ android:label="@string/network_settings_title"
+ android:exported="true"
+ android:launchMode="singleTask">
+ <intent-filter android:priority="1">
+ <!-- Displays the MobileNetworkActivity and opt-in dialog for capability discovery. -->
+ <action android:name="android.telephony.ims.action.SHOW_CAPABILITY_DISCOVERY_OPT_IN" />
+ <action android:name="android.settings.NETWORK_OPERATOR_SETTINGS" />
+ <action android:name="android.settings.DATA_ROAMING_SETTINGS" />
+ <action android:name="android.settings.MMS_MESSAGE_SETTING" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+
<activity android:name=".Settings$MobileNetworkListActivity"
android:exported="true"
android:label="@string/network_settings_title">
@@ -2535,6 +2545,8 @@
</intent-filter>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.fuelgauge.batterysaver.BatterySaverSettings" />
+ <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
+ android:value="@string/menu_key_battery"/>
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
@@ -2560,6 +2572,8 @@
</intent-filter>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.accounts.AccountSyncSettings" />
+ <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
+ android:value="@string/menu_key_accounts"/>
<meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
android:value="true" />
</activity>
@@ -2574,6 +2588,8 @@
</intent-filter>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.accounts.ManagedProfileSettings" />
+ <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
+ android:value="@string/menu_key_accounts"/>
</activity>
<activity
@@ -2594,6 +2610,8 @@
android:configChanges="orientation|keyboardHidden|screenSize">
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.accounts.ChooseAccountFragment" />
+ <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
+ android:value="@string/menu_key_accounts"/>
</activity>
<activity android:name=".CryptKeeper"
@@ -2652,6 +2670,8 @@
</intent-filter>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.security.CryptKeeperSettings" />
+ <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
+ android:value="@string/menu_key_security"/>
</activity>
<activity
@@ -2669,6 +2689,8 @@
</intent-filter>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.datausage.DataUsageSummary" />
+ <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
+ android:value="@string/menu_key_network"/>
</activity>
<activity
android:name="Settings$MobileDataUsageListActivity"
@@ -2680,6 +2702,8 @@
</intent-filter>
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
android:value="com.android.settings.datausage.DataUsageList" />
+ <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
+ android:value="@string/menu_key_network"/>
</activity>
<activity