diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 2670f5ffc0e..91b739c95ab 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -91,9 +91,11 @@
+
-
+
@@ -131,6 +133,9 @@
android:value="com.android.settings.WirelessSettings" />
+
+
@@ -290,6 +295,8 @@
+
+
+
+
+
+
+
+
+
@@ -558,6 +580,8 @@
android:value="com.android.settings.notification.ZenModeSettings" />
+
+
+
@@ -618,6 +646,8 @@
android:value="com.android.settings.DeviceInfoSettings" />
+
+
+
+
+
+
+
+
+
+
@@ -1040,6 +1088,8 @@
+
+
+
@@ -1115,6 +1168,8 @@
+
@@ -1138,6 +1193,8 @@
android:value="com.android.settings.DevelopmentSettings" />
+
+
@@ -1324,6 +1383,8 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -1728,6 +1808,8 @@
android:value="com.android.settings.notification.NotificationSettings" />
+
@@ -1780,6 +1862,8 @@
+
resolvedIntents = pm.queryIntentActivities(intent,
+ GET_ACTIVITIES | GET_META_DATA | GET_RESOLVED_FILTER);
+ final int count = resolvedIntents.size();
+ for (int i = 0; i < count; i++) {
+ ResolveInfo info = resolvedIntents.get(i);
+ if (info.filter != null && info.activityInfo != null
+ && info.activityInfo.metaData != null) {
+ boolean shouldForward = info.activityInfo.metaData.getBoolean(
+ PRIMARY_PROFILE_SETTING);
+ if (shouldForward) {
+ pm.addCrossProfileIntentFilter(info.filter, UserHandle.myUserId(),
+ UserHandle.USER_OWNER, PackageManager.SKIP_CURRENT_PROFILE);
+ }
+ }
+ }
+
+ // Disable launcher icon
+ // Note: This needs to happen after forwarding intents, otherwise the main Settings
+ // intent gets lost
+ ComponentName settingsComponentName = new ComponentName(context, Settings.class);
+ pm.setComponentEnabledSetting(settingsComponentName,
+ PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
+ }
+}