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

Commit 0d88d54c authored by Fyodor Kupolov's avatar Fyodor Kupolov
Browse files

Call defuse even when restrictions bundle is empty

Bug: 28259217
Change-Id: I3e9ba60ee80d1fedef4844d264b312418c287be4
parent 8dd32a56
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2372,11 +2372,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);
            }