diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 7462c77cc78..17f1e542a79 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" />
+
+
+
+
+
+
+
+
+
+
@@ -1030,6 +1078,8 @@
+
+
+
@@ -1105,6 +1158,8 @@
+
@@ -1128,6 +1183,8 @@
android:value="com.android.settings.DevelopmentSettings" />
+
+
@@ -1314,6 +1373,8 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -1718,6 +1798,8 @@
android:value="com.android.settings.notification.NotificationSettings" />
+
@@ -1770,6 +1852,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);
+ }
+}