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

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

Change-Id: I6b10b36dff4278873dcb01b19c635a06eda5207f
This commit is contained in:
Treehugger Robot
2021-08-14 01:27:50 +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="