Fix settings back button return to previous launched page
QuickSetting use FLAG_ACTIVITY_NEW_TASK flag to launch setting page. It shares the same
taskid with Settings. That's why user press BACK key will return the previous settings
page. Now add the new taskAffinity in Settings homepage to fix this problem.
Fixes: 135018024
Test: manual & robotest
Change-Id: Ic73645e9afe5415691f0696c5ae33a9eacda6d50
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4b070a6..07dd1dd 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -118,6 +118,7 @@
<activity android:name=".homepage.SettingsHomepageActivity"
android:label="@string/settings_label_launcher"
android:theme="@style/Theme.Settings.Home"
+ android:taskAffinity="com.android.settings.root"
android:launchMode="singleTask">
<intent-filter android:priority="1">
<action android:name="android.settings.SETTINGS" />
@@ -142,6 +143,7 @@
<!-- Alias for launcher activity only, as this belongs to each profile. -->
<activity-alias android:name="Settings"
android:label="@string/settings_label_launcher"
+ android:taskAffinity="com.android.settings.root"
android:launchMode="singleTask"
android:targetActivity=".homepage.SettingsHomepageActivity">
<intent-filter>