Loading services/core/java/com/android/server/PersistentDataBlockService.java +6 −5 Original line number Diff line number Diff line Loading @@ -466,12 +466,13 @@ public class PersistentDataBlockService extends SystemService { enforceOemUnlockWritePermission(); enforceIsAdmin(); // Do not allow oem unlock modification if it has been disallowed. if (enabled) { // Do not allow oem unlock to be enabled if it has been disallowed. if (Settings.Global.getInt(getContext().getContentResolver(), Settings.Global.OEM_UNLOCK_DISALLOWED, 0) == 1) { throw new SecurityException("OEM unlock has been disallowed."); throw new SecurityException( "OEM unlock has been disallowed by OEM_UNLOCK_DISALLOWED."); } if (enabled) { enforceFactoryResetAllowed(); } synchronized (mLock) { Loading services/core/java/com/android/server/pm/UserRestrictionsUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -429,7 +429,7 @@ public class UserRestrictionsUtils { if (newValue) { PersistentDataBlockManager manager = (PersistentDataBlockManager) context .getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE); if (manager != null) { if (manager != null && manager.getOemUnlockEnabled()) { manager.setOemUnlockEnabled(false); } } Loading Loading
services/core/java/com/android/server/PersistentDataBlockService.java +6 −5 Original line number Diff line number Diff line Loading @@ -466,12 +466,13 @@ public class PersistentDataBlockService extends SystemService { enforceOemUnlockWritePermission(); enforceIsAdmin(); // Do not allow oem unlock modification if it has been disallowed. if (enabled) { // Do not allow oem unlock to be enabled if it has been disallowed. if (Settings.Global.getInt(getContext().getContentResolver(), Settings.Global.OEM_UNLOCK_DISALLOWED, 0) == 1) { throw new SecurityException("OEM unlock has been disallowed."); throw new SecurityException( "OEM unlock has been disallowed by OEM_UNLOCK_DISALLOWED."); } if (enabled) { enforceFactoryResetAllowed(); } synchronized (mLock) { Loading
services/core/java/com/android/server/pm/UserRestrictionsUtils.java +1 −1 Original line number Diff line number Diff line Loading @@ -429,7 +429,7 @@ public class UserRestrictionsUtils { if (newValue) { PersistentDataBlockManager manager = (PersistentDataBlockManager) context .getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE); if (manager != null) { if (manager != null && manager.getOemUnlockEnabled()) { manager.setOemUnlockEnabled(false); } } Loading