OSDN Git Service

Always synchronize the OemUnlockAllowed bit to the FRP partition
authorWei Wang <wvw@google.com>
Wed, 20 Dec 2017 23:56:46 +0000 (15:56 -0800)
committerWei Wang <wvw@google.com>
Thu, 21 Dec 2017 19:39:04 +0000 (11:39 -0800)
commitade05380118b6b1069419f6bb3b5aa4f2a5ae006
treecb5f249eb9967002a49e90632d5fec828fddbbe9
parent1d47305bfee59070dbd355c12bab853e8652df8a
Always synchronize the OemUnlockAllowed bit to the FRP partition

ag/3023334 tried to synchronize the OemUnlockAllowed bit to the FRP
partition when deice is being unlocked.
However it missed a case when device was unlocked before ag/3023334
landed.
This CL will sync synchronize the OemUnlockAllowed bit on
isOemUnlockAllowed(), and it avoids redundant write by checking if
the bit is already synced.

Bug: 67043266
Bug: 68245782
Test: do factory reset on a device unlocked before ag/3023334 and FRP is
      not enforced
Change-Id: If209757cfbb202e180a5b2c1b5259af6d00aa599
services/core/java/com/android/server/oemlock/OemLockService.java