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

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

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