Merge "Call defuse even when restrictions bundle is empty" into nyc-dev
am: f33e2da
* commit 'f33e2da0378a20bfc096fabcd3d8ef255e39eaeb':
Call defuse even when restrictions bundle is empty
Change-Id: I2359e2cf9706211682ca2a4c79e62567532fa1f0
This commit is contained in:
@@ -2359,11 +2359,13 @@ public class UserManagerService extends IUserManager.Stub {
|
||||
public void setApplicationRestrictions(String packageName, Bundle restrictions,
|
||||
int userId) {
|
||||
checkSystemOrRoot("set application restrictions");
|
||||
if (restrictions != null) {
|
||||
restrictions.setDefusable(true);
|
||||
}
|
||||
synchronized (mPackagesLock) {
|
||||
if (restrictions == null || restrictions.isEmpty()) {
|
||||
cleanAppRestrictionsForPackage(packageName, userId);
|
||||
} else {
|
||||
restrictions.setDefusable(true);
|
||||
// Write the restrictions to XML
|
||||
writeApplicationRestrictionsLP(packageName, restrictions, userId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user