cmparts: Refactor for RemotePreference and SettingsHelper

 * Use the new stuff in the SDK to standardize on how to deal with
   remote components and settings.
 * Eliminates code and should be more secure.

Change-Id: I9fd148a844877004cd1526a5fc86d3d1529ecbc8
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 6cde44e..1bdf33d 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -36,7 +36,7 @@
     <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
     <uses-permission android:name="android.permission.READ_SEARCH_INDEXABLES" />
 
-    <uses-permission android:name="cyanogenmod.permission.MANAGE_PARTS" />
+    <uses-permission android:name="cyanogenmod.permission.MANAGE_REMOTE_PREFERENCES" />
 
     <protected-broadcast android:name="cyanogenmod.platform.app.profiles.PROFILES_STATE_CHANGED" />
     <protected-broadcast android:name="org.cyanogenmod.cmparts.PART_CHANGED" />
@@ -49,23 +49,26 @@
             android:defaultToDeviceProtectedStorage="true"
             android:directBootAware="true">
 
-        <activity android:name="PartsActivity">
+        <activity android:name=".PartsActivity">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
+            <meta-data
+                android:name="org.cyanogenmod.settings.summary.receiver"
+                android:value="org.cyanogenmod.cmparts.PartsUpdater" />
         </activity>
 
-        <receiver android:name="BootReceiver" android:enabled="true">
+        <receiver android:name=".BootReceiver" android:enabled="true">
             <intent-filter android:priority="2147483647">
                 <action android:name="android.intent.action.BOOT_COMPLETED" />
             </intent-filter>
         </receiver>
 
-        <receiver android:name=".RefreshReceiver" android:enabled="true">
+        <receiver android:name=".PartsUpdater" android:enabled="true">
             <intent-filter>
-                <action android:name="org.cyanogenmod.cmparts.REFRESH_PART" />
-                <action android:name="org.cyanogenmod.settings.REFRESH_SUMMARY" />
+                <action android:name="cyanogenmod.intent.action.UPDATE_PREFERENCE" />
+                <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </receiver>
 
@@ -98,7 +101,7 @@
                 android:resource="@drawable/ic_settings_privacy" />
             <meta-data
                 android:name="org.cyanogenmod.settings.summary.receiver"
-                android:value="org.cyanogenmod.cmparts.RefreshReceiver" />
+                android:value="org.cyanogenmod.cmparts.PartsUpdater" />
             <meta-data
                 android:name="org.cyanogenmod.settings.summary.key"
                 android:value="privacy_settings" />
@@ -122,7 +125,7 @@
                 android:resource="@drawable/ic_settings_buttons" />
             <meta-data
                 android:name="org.cyanogenmod.settings.summary.receiver"
-                android:value="org.cyanogenmod.cmparts.RefreshReceiver" />
+                android:value="org.cyanogenmod.cmparts.PartsUpdater" />
             <meta-data
                 android:name="org.cyanogenmod.settings.summary.key"
                 android:value="button_settings" />
@@ -146,7 +149,7 @@
                 android:resource="@drawable/ic_settings_profiles" />
             <meta-data
                 android:name="org.cyanogenmod.settings.summary.receiver"
-                android:value="org.cyanogenmod.cmparts.RefreshReceiver" />
+                android:value="org.cyanogenmod.cmparts.PartsUpdater" />
             <meta-data
                 android:name="org.cyanogenmod.settings.summary.key"
                 android:value="profiles_settings" />
@@ -170,7 +173,7 @@
                 android:resource="@drawable/ic_settings_statusbar" />
             <meta-data
                 android:name="org.cyanogenmod.settings.summary.receiver"
-                android:value="org.cyanogenmod.cmparts.RefreshReceiver" />
+                android:value="org.cyanogenmod.cmparts.PartsUpdater" />
             <meta-data
                 android:name="org.cyanogenmod.settings.summary.key"
                 android:value="status_bar_settings" />