Merge "Do not turn on Bluetooth when booting into Safe Mode" am: 34ed823dae am: 8ae1de7afe am: 121bafc53e

am: 88ddf773bd

Change-Id: Iccfe6a6854f9e22cdc5a5bcdafc4529116bc88bf
This commit is contained in:
Zongheng Wang
2019-07-23 00:25:56 -07:00
committed by android-build-merger

View File

@@ -1185,7 +1185,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
if (isBluetoothDisallowed) {
return;
}
if (mEnableExternal && isBluetoothPersistedStateOnBluetooth()) {
final boolean isSafeMode = mContext.getPackageManager().isSafeMode();
if (mEnableExternal && isBluetoothPersistedStateOnBluetooth() && !isSafeMode) {
if (DBG) {
Slog.d(TAG, "Auto-enabling Bluetooth.");
}