From 9e9c77c130a96a3855acf2d62225e21024b05834 Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Tue, 9 Jul 2013 11:28:40 -0700 Subject: [PATCH] Fix accidental creation of restriction entry for required apps When entering Settings->Restrictions, don't automatically query restriction entries for required apps. Bug: 9681399 Change-Id: Idcc773bf4793b3e7e2b328a15881b7ecf930c6c3 --- src/com/android/settings/users/AppRestrictionsFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/users/AppRestrictionsFragment.java b/src/com/android/settings/users/AppRestrictionsFragment.java index 827458ff9b6..2f99d115f78 100644 --- a/src/com/android/settings/users/AppRestrictionsFragment.java +++ b/src/com/android/settings/users/AppRestrictionsFragment.java @@ -601,7 +601,8 @@ public class AppRestrictionsFragment extends SettingsPreferenceFragment implemen if (!hasSettings && !isSettingsApp) continue; // Get and populate the defaults, since the user is not going to be // able to toggle this app ON (it's ON by default and immutable). - if (hasSettings) { + // Only do this for restricted profiles, not single-user restrictions + if (hasSettings && mRestrictedProfile) { requestRestrictionsForApp(packageName, p); } } else if (!mNewUser && isAppEnabledForUser(pi)) { /*appInfoListHasPackage(mUserApps, packageName)*/