Allow SHELL_UID to disable Bluetooth for testing

Bug: 189952422
Test: atest VtsHalBluetoothV1_0TargetTest
Change-Id: Id45a43b824b2be49fb38686f9582484931024187
This commit is contained in:
Myles Watson
2021-08-13 16:03:12 -07:00
parent 89320ec08f
commit c4b27dfce3

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="