Application restrictions UI

Refactored User Settings UI to have two types of users.
Display a list of apps to select.
Edit user restrictions.
Handle saving and updating RestrictionEntry items via
User Manager.

Change-Id: I3ad5aa71d5ef66dffd39e17ba0556f075ac10a0f
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4668dd9..50afaa1 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -69,6 +69,7 @@
             android:taskAffinity=""
             android:theme="@android:style/Theme.Holo"
             android:hardwareAccelerated="true"
+            android:requiredForAllUsers="true"
             android:supportsRtl="true">
 
         <!-- Settings -->
@@ -85,6 +86,16 @@
             </intent-filter>
         </activity>
 
+        <!-- User Restrictions activity -->
+
+        <activity android:name=".users.UserRestrictionsActivity"
+                android:label="@string/user_restrictions_title">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+
         <activity android:name=".SubSettings"
                 android:taskAffinity="com.android.settings"
                 android:parentActivityName="Settings">
@@ -734,6 +745,16 @@
             </intent-filter>
         </activity-alias>
 
+        <activity android:name=".users.AppRestrictionsFragment$Activity"
+                android:label="@string/application_info_label"
+                android:exported="true"
+                android:taskAffinity="">
+            <intent-filter>
+                <action android:name="com.android.settings.APP_RESTRICTIONS" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+
         <!-- Provide direct entry into manage apps showing running services. -->
         <activity android:name="Settings$RunningServicesActivity"
                 android:label="@string/runningservices_settings_title"
@@ -1516,6 +1537,22 @@
                 android:resource="@id/display_settings" />
         </activity>
 
+        <activity android:name="Settings$UserSettingsActivity"
+                android:uiOptions="splitActionBarWhenNarrow"
+                android:label="@string/user_settings_title"
+                android:taskAffinity=""
+                android:excludeFromRecents="true">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <action android:name="android.settings.USER_SETTINGS" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+                android:value="com.android.settings.users.UserSettings" />
+            <meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID"
+                android:resource="@id/user_settings" />
+        </activity>
+
         <receiver android:name=".widget.SettingsAppWidgetProvider"
                 android:label="@string/gadget_title"
                 android:exported="true"
@@ -1546,5 +1583,11 @@
             </intent-filter>
         </receiver>
 
+        <receiver android:name=".users.RestrictionsReceiver">
+            <intent-filter>
+                <action android:name="android.intent.action.GET_RESTRICTION_ENTRIES"/>
+            </intent-filter>
+        </receiver>
+
     </application>
 </manifest>