@VisibleForTesting boolean isBootloaderUnlocked() { return mOemLockManager.isDeviceOemUnlocked(); } private boolean enableOemUnlockPreference() { return !isBootloaderUnlocked() && isOemUnlockAllowedByUserAndCarrier(); } @VisibleForTesting boolean showKeyguardConfirmation(Resources resources, int requestCode) { final ChooseLockSettingsHelper.Builder builder = new ChooseLockSettingsHelper.Builder(mActivity, mFragment); return builder.setRequestCode(requestCode) .setTitle(resources.getString(R.string.oem_unlock_enable)) .show(); }
时间: 2023-03-31 15:01:59 浏览: 255
这是一段代码,它的作用是判断设备的 bootloader 是否已经解锁,并返回一个布尔值。如果 bootloader 已经解锁,那么 enableOemUnlockPreference() 方法将返回 false,否则返回 true。
阅读全文