Merge "Allow SHELL_UID to disable Bluetooth for testing"

This commit is contained in:
Treehugger Robot
2021-08-14 00:42:29 +00:00
committed by Gerrit Code Review

View File

@@ -2430,7 +2430,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="