cmparts: Add PartsRefresher for updating remote UI components
* We need to keep the UI up to date with changes to the
state of parts, for example to refresh the summary of a
preference when it's changed by the user.
* This works using broadcasts.
Change-Id: I07bf1358535db6ba40f8ee5a2826537f75e34cba
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4bd528b..01331f9 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -36,10 +36,11 @@
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_SEARCH_INDEXABLES" />
- <uses-permission android:name="cyanogenmod.permission.BIND_CORE_SERVICE" />
+ <uses-permission android:name="cyanogenmod.permission.MANAGE_PARTS" />
<protected-broadcast android:name="cyanogenmod.platform.app.profiles.PROFILES_STATE_CHANGED" />
<protected-broadcast android:name="org.cyanogenmod.cmparts.PART_CHANGED" />
+ <protected-broadcast android:name="org.cyanogenmod.cmparts.REFRESH_PART" />
<application android:label="@string/cmparts_title"
android:theme="@style/Theme.Settings"
@@ -61,6 +62,12 @@
</intent-filter>
</receiver>
+ <receiver android:name=".RefreshReceiver" android:enabled="true">
+ <intent-filter>
+ <action android:name="org.cyanogenmod.cmparts.REFRESH_PART" />
+ </intent-filter>
+ </receiver>
+
<provider android:name=".search.CMPartsSearchIndexablesProvider"
android:authorities="org.cyanogenmod.cmparts"
android:multiprocess="false"