OSDN Git Service

resolve merge conflicts of 718f321 to nyc-mr1-dev
authorAmith Yamasani <yamasani@google.com>
Wed, 8 Jun 2016 18:40:55 +0000 (11:40 -0700)
committerAmith Yamasani <yamasani@google.com>
Wed, 8 Jun 2016 18:43:46 +0000 (18:43 +0000)
Change-Id: I0021aa5be1822082d8ff026cafa8c8b6b56b90b5

1  2 
api/system-current.txt
core/res/AndroidManifest.xml
services/core/java/com/android/server/PersistentDataBlockService.java

Simple merge
Simple merge
@@@ -452,18 -452,9 +462,18 @@@ public class PersistentDataBlockServic
              if (ActivityManager.isUserAMonkey()) {
                  return;
              }
-             enforceOemUnlockPermission();
 +
+             enforceOemUnlockWritePermission();
              enforceIsAdmin();
  
 +            // Do not allow oem unlock modification 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.");
 +            }
 +            if (enabled) {
 +                enforceFactoryResetAllowed();
 +            }
              synchronized (mLock) {
                  doSetOemUnlockEnabledLocked(enabled);
                  computeAndWriteDigestLocked();