diff options
author | Jessica Wagantall <jwagantall@cyngn.com> | 2016-05-03 11:38:47 -0700 |
---|---|---|
committer | Jessica Wagantall <jwagantall@cyngn.com> | 2016-05-03 11:59:47 -0700 |
commit | 4d5f0cf9875bb7f6d681c912fc71994b81391c4b (patch) | |
tree | 5ef181a19a1e029533b77be459e0718c2d8c349a /services/core | |
parent | adbe561620aa74c3c3121cbde26e784237cde7e9 (diff) | |
parent | 12332e05f632794e18ea8c4ac52c98e82532e5db (diff) | |
download | frameworks_base-4d5f0cf9875bb7f6d681c912fc71994b81391c4b.zip frameworks_base-4d5f0cf9875bb7f6d681c912fc71994b81391c4b.tar.gz frameworks_base-4d5f0cf9875bb7f6d681c912fc71994b81391c4b.tar.bz2 |
Merge tag 'android-6.0.1_r43' into HEAD
Ticket: CYNGNOS-2373
Android 6.0.1 release 43 (MOB30J)
Change-Id: I5620fc9e444f5b0997ca9c70100f685c1699bfe8
Diffstat (limited to 'services/core')
-rw-r--r-- | services/core/java/com/android/server/pm/UserManagerService.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java index 06c3682..fd9979f 100644 --- a/services/core/java/com/android/server/pm/UserManagerService.java +++ b/services/core/java/com/android/server/pm/UserManagerService.java @@ -262,6 +262,17 @@ public class UserManagerService extends IUserManager.Stub { Log.w(LOG_TAG, "Unable to notify AppOpsService of UserRestrictions"); } } + UserInfo currentGuestUser = null; + synchronized (mPackagesLock) { + currentGuestUser = findCurrentGuestUserLocked(); + } + if (currentGuestUser != null && !hasUserRestriction( + UserManager.DISALLOW_CONFIG_WIFI, currentGuestUser.id)) { + // If a guest user currently exists, apply the DISALLOW_CONFIG_WIFI option + // to it, in case this guest was created in a previous version where this + // user restriction was not a default guest restriction. + setUserRestriction(UserManager.DISALLOW_CONFIG_WIFI, true, currentGuestUser.id); + } } @Override @@ -509,6 +520,7 @@ public class UserManagerService extends IUserManager.Stub { if (mGuestRestrictions.isEmpty()) { mGuestRestrictions.putBoolean(UserManager.DISALLOW_OUTGOING_CALLS, true); mGuestRestrictions.putBoolean(UserManager.DISALLOW_SMS, true); + mGuestRestrictions.putBoolean(UserManager.DISALLOW_CONFIG_WIFI, true); } } |