Merge "Fix dev settings crash when no OEM unlock service" am: 44cacaa8f1
am: f6d960ac31
Change-Id: I536daa3948be136524e35e35448df09eaa6ad9da
This commit is contained in:
@@ -395,7 +395,9 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
|
|||||||
mBackupManager = IBackupManager.Stub.asInterface(
|
mBackupManager = IBackupManager.Stub.asInterface(
|
||||||
ServiceManager.getService(Context.BACKUP_SERVICE));
|
ServiceManager.getService(Context.BACKUP_SERVICE));
|
||||||
mWebViewUpdateService = WebViewFactory.getUpdateService();
|
mWebViewUpdateService = WebViewFactory.getUpdateService();
|
||||||
mOemLockManager = (OemLockManager) getSystemService(Context.OEM_LOCK_SERVICE);
|
if (showEnableOemUnlockPreference(getContext())) {
|
||||||
|
mOemLockManager = (OemLockManager) getSystemService(Context.OEM_LOCK_SERVICE);
|
||||||
|
}
|
||||||
mTelephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
|
mTelephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
|
||||||
|
|
||||||
mUm = (UserManager) getSystemService(Context.USER_SERVICE);
|
mUm = (UserManager) getSystemService(Context.USER_SERVICE);
|
||||||
@@ -1054,7 +1056,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean showEnableOemUnlockPreference(Context context) {
|
private static boolean showEnableOemUnlockPreference(Context context) {
|
||||||
return context.getSystemService(Context.OEM_LOCK_SERVICE) != null;
|
return ServiceManager.getService(Context.OEM_LOCK_SERVICE) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user