Loading core/java/android/service/oemlock/IOemLockService.aidl +0 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ interface IOemLockService { void setOemUnlockAllowedByUser(boolean allowed); boolean isOemUnlockAllowedByUser(); boolean canUserAllowOemUnlock(); boolean isOemUnlockAllowed(); boolean isDeviceOemUnlocked(); } core/java/android/service/oemlock/OemLockManager.java +0 −18 Original line number Diff line number Diff line Loading @@ -117,24 +117,6 @@ public class OemLockManager { } } /** * Returns whether all parties other than the user allow OEM unlock meaning the user can * directly control whether or not the device can be OEM unlocked. * * If this is true, {@link #isOemUnlockAllowedByUser} is the same as {@link #isOemUnlockAllowed} * * @return Whether the user can directly control whether the device can be OEM unlocked. * * @hide */ public boolean canUserAllowOemUnlock() { try { return mService.canUserAllowOemUnlock(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * @return Whether the bootloader is able to OEM unlock the device. * Loading services/core/java/com/android/server/oemlock/OemLockService.java +6 −14 Original line number Diff line number Diff line Loading @@ -149,8 +149,12 @@ public class OemLockService extends SystemService { final long token = Binder.clearCallingIdentity(); try { if (!canUserAllowOemUnlock()) { throw new SecurityException("User cannot allow OEM unlock"); if (!isOemUnlockAllowedByAdmin()) { throw new SecurityException("Admin does not allow OEM unlock"); } if (!mOemLock.isOemUnlockAllowedByCarrier()) { throw new SecurityException("Carrier does not allow OEM unlock"); } mOemLock.setOemUnlockAllowedByDevice(allowedByUser); Loading @@ -171,18 +175,6 @@ public class OemLockService extends SystemService { } } @Override public boolean canUserAllowOemUnlock() { enforceOemUnlockReadPermission(); final long token = Binder.clearCallingIdentity(); try { return isOemUnlockAllowedByAdmin() && mOemLock.isOemUnlockAllowedByCarrier(); } finally { Binder.restoreCallingIdentity(token); } } @Override public boolean isOemUnlockAllowed() { enforceOemUnlockReadPermission(); Loading Loading
core/java/android/service/oemlock/IOemLockService.aidl +0 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ interface IOemLockService { void setOemUnlockAllowedByUser(boolean allowed); boolean isOemUnlockAllowedByUser(); boolean canUserAllowOemUnlock(); boolean isOemUnlockAllowed(); boolean isDeviceOemUnlocked(); }
core/java/android/service/oemlock/OemLockManager.java +0 −18 Original line number Diff line number Diff line Loading @@ -117,24 +117,6 @@ public class OemLockManager { } } /** * Returns whether all parties other than the user allow OEM unlock meaning the user can * directly control whether or not the device can be OEM unlocked. * * If this is true, {@link #isOemUnlockAllowedByUser} is the same as {@link #isOemUnlockAllowed} * * @return Whether the user can directly control whether the device can be OEM unlocked. * * @hide */ public boolean canUserAllowOemUnlock() { try { return mService.canUserAllowOemUnlock(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * @return Whether the bootloader is able to OEM unlock the device. * Loading
services/core/java/com/android/server/oemlock/OemLockService.java +6 −14 Original line number Diff line number Diff line Loading @@ -149,8 +149,12 @@ public class OemLockService extends SystemService { final long token = Binder.clearCallingIdentity(); try { if (!canUserAllowOemUnlock()) { throw new SecurityException("User cannot allow OEM unlock"); if (!isOemUnlockAllowedByAdmin()) { throw new SecurityException("Admin does not allow OEM unlock"); } if (!mOemLock.isOemUnlockAllowedByCarrier()) { throw new SecurityException("Carrier does not allow OEM unlock"); } mOemLock.setOemUnlockAllowedByDevice(allowedByUser); Loading @@ -171,18 +175,6 @@ public class OemLockService extends SystemService { } } @Override public boolean canUserAllowOemUnlock() { enforceOemUnlockReadPermission(); final long token = Binder.clearCallingIdentity(); try { return isOemUnlockAllowedByAdmin() && mOemLock.isOemUnlockAllowedByCarrier(); } finally { Binder.restoreCallingIdentity(token); } } @Override public boolean isOemUnlockAllowed() { enforceOemUnlockReadPermission(); Loading