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
This commit is contained in:
Sunny Shao
2019-06-18 13:32:05 +08:00
committed by Raff Tsai
parent f81813006e
commit 0b0e6fc3a0

View File

@@ -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>