Fix Slices in Panel no-op bug

Slices in panels stopped changing the underlying settings.

It is not always reproducible, but the error happend when PendingIntents
started failing to fire, and thus not connecting with the Broadcast
Receiver in Settings dedicated to handling Slice changes.

This fix always highlighted that we shouldn't be using TaskAffinity,
because there is no guarantee 3p apps don't spoof it.

In order to fix both the PendingIntent issue, and to de-dupe activities
from Settings vs Settings Panels: we use 'documentLaunchMode=always' instead.

Fixes: 129006165
Test: manual
Test: atest SettingsPanelTest
Change-Id: If94dd719a2e33c85c04a416868f565f719941234
This commit is contained in:
Matthew Fritze
2019-03-20 12:28:25 -07:00
parent 23924cf3f4
commit 1c60b80084

View File

@@ -3016,9 +3016,8 @@
<activity android:name=".panel.SettingsPanelActivity" <activity android:name=".panel.SettingsPanelActivity"
android:label="@string/settings_panel_title" android:label="@string/settings_panel_title"
android:theme="@style/Theme.BottomDialog" android:theme="@style/Theme.BottomDialog"
android:documentLaunchMode="always"
android:excludeFromRecents="true" android:excludeFromRecents="true"
android:launchMode="singleTop"
android:taskAffinity=".panel.SettingsPanelActivity"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.settings.panel.action.INTERNET_CONNECTIVITY" /> <action android:name="android.settings.panel.action.INTERNET_CONNECTIVITY" />