diff options
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/pm/Settings.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/services/java/com/android/server/pm/Settings.java b/services/java/com/android/server/pm/Settings.java index f2074b0..4b716ed 100644 --- a/services/java/com/android/server/pm/Settings.java +++ b/services/java/com/android/server/pm/Settings.java @@ -444,10 +444,13 @@ final class Settings { final boolean installed = installUser == null || installUser.getIdentifier() == UserHandle.USER_ALL || installUser.getIdentifier() == user.id; - final boolean privacyGuard = android.provider.Settings.Secure.getIntForUser( + boolean privacyGuard = false; + if (installUser != null) { + privacyGuard = android.provider.Settings.Secure.getIntForUser( mContext.getContentResolver(), android.provider.Settings.Secure.PRIVACY_GUARD_DEFAULT, 0, user.id) == 1; + } p.setUserState(user.id, COMPONENT_ENABLED_STATE_DEFAULT, installed, true, // stopped, |