Merge "Enforce permission before checking OEM unlocking setting" into nyc-mr1-dev
am: 914411a1e2
* commit '914411a1e2bdf802dcb04202686f446056ee2da9':
Enforce permission before checking OEM unlocking setting
Change-Id: I7060bee9cb58d45985e3a9f9a6de21b0aa1ba1ed
This commit is contained in:
@@ -443,13 +443,15 @@ public class PersistentDataBlockService extends SystemService {
|
|||||||
if (ActivityManager.isUserAMonkey()) {
|
if (ActivityManager.isUserAMonkey()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enforceOemUnlockPermission();
|
||||||
|
enforceIsAdmin();
|
||||||
|
|
||||||
// Do not allow oem unlock modification if it has been disallowed.
|
// Do not allow oem unlock modification if it has been disallowed.
|
||||||
if (Settings.Global.getInt(getContext().getContentResolver(),
|
if (Settings.Global.getInt(getContext().getContentResolver(),
|
||||||
Settings.Global.OEM_UNLOCK_DISALLOWED, 0) == 1) {
|
Settings.Global.OEM_UNLOCK_DISALLOWED, 0) == 1) {
|
||||||
throw new SecurityException("OEM unlock has been disallowed.");
|
throw new SecurityException("OEM unlock has been disallowed.");
|
||||||
}
|
}
|
||||||
enforceOemUnlockPermission();
|
|
||||||
enforceIsAdmin();
|
|
||||||
|
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
doSetOemUnlockEnabledLocked(enabled);
|
doSetOemUnlockEnabledLocked(enabled);
|
||||||
|
|||||||
Reference in New Issue
Block a user