Merge "Clear mGuestRestrictions before loading from disk"
This commit is contained in:
committed by
Android (Google) Code Review
commit
d249e0892a
@@ -1810,8 +1810,8 @@ public class UserManagerService extends IUserManager.Stub {
|
||||
if (type == XmlPullParser.START_TAG) {
|
||||
if (parser.getName().equals(TAG_RESTRICTIONS)) {
|
||||
synchronized (mGuestRestrictions) {
|
||||
mGuestRestrictions.putAll(
|
||||
UserRestrictionsUtils.readRestrictions(parser));
|
||||
UserRestrictionsUtils
|
||||
.readRestrictions(parser, mGuestRestrictions);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -207,6 +207,7 @@ public class UserRestrictionsUtils {
|
||||
}
|
||||
|
||||
public static void readRestrictions(XmlPullParser parser, Bundle restrictions) {
|
||||
restrictions.clear();
|
||||
for (String key : USER_RESTRICTIONS) {
|
||||
final String value = parser.getAttributeValue(null, key);
|
||||
if (value != null) {
|
||||
|
||||
Reference in New Issue
Block a user