Merge "Allow SHELL_UID to disable Bluetooth for testing" am: 4c462beeae am: 461ea8ce30 am: 9119471001 am: 58d5a7b6e0

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1796128

Change-Id: I4719672c343c3b20008cb61e209d9d1c00a7e8c8
This commit is contained in:
Treehugger Robot
2021-08-15 04:41:31 +00:00
committed by Automerger Merge Worker

View File

@@ -2483,7 +2483,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
try {
foregroundUser = ActivityManager.getCurrentUser();
valid = (callingUser == foregroundUser) || parentUser == foregroundUser
|| callingAppId == Process.NFC_UID || callingAppId == mSystemUiUid;
|| callingAppId == Process.NFC_UID || callingAppId == mSystemUiUid
|| callingAppId == Process.SHELL_UID;
if (DBG && !valid) {
Slog.d(TAG, "checkIfCallerIsForegroundUser: valid=" + valid + " callingUser="
+ callingUser + " parentUser=" + parentUser + " foregroundUser="