Hide SettingsSlice provider
Explicitly set the Settings SliceBroadcastReceiver to
be non-exported and remove the intent-filter.
Add a second provider: SliceRelayReceiver to receive
broadcasts from SysUI to alert Settings to potential
changes to bound Settings Slices. The new receiver is
exported, but only notifies changes to Settings, and
doesn't make any changes itself.
Change-Id: I80d070f7636614135ebe4f57a16f12a3eb6dee81
Fixes: 111330641
Test: boot, robolectric, Slicebrowser
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index d435731..22ab12d 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -3137,10 +3137,15 @@
</provider>
<receiver
- android:name=".slices.SliceBroadcastReceiver" >
- <intent-filter>
- <action android:name="com.android.settings.slice.action.WIFI_CHANGED"/>
- </intent-filter>
+ android:name=".slices.SliceBroadcastReceiver"
+ android:exported="false">
+ </receiver>
+
+ <receiver
+ android:name=".slices.SliceRelayReceiver"
+ android:permission="android.permission.MANAGE_SLICE_PERMISSIONS"
+ android:exported="true">
+
</receiver>
<!-- Couldn't be triggered from outside of settings. Statsd can trigger it because we send