Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f33e2da0 authored by Fyodor Kupolov's avatar Fyodor Kupolov Committed by Android (Google) Code Review
Browse files

Merge "Call defuse even when restrictions bundle is empty" into nyc-dev

parents 66e640d8 0d88d54c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);
            }