summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@google.com>2021-08-13 16:03:12 -0700
committerMyles Watson <mylesgw@google.com>2021-08-13 16:03:12 -0700
commita44dee9fc7fc187eb74dadbdbd033feed71fa3e3 (patch)
tree4af667a2468b2f2122eb81f62e6be55958a02d1e
parent2887975da870544bfa506b72d87d329854462471 (diff)
Allow SHELL_UID to disable Bluetooth for testing
Bug: 189952422 Test: atest VtsHalBluetoothV1_0TargetTest Change-Id: Id45a43b824b2be49fb38686f9582484931024187
-rw-r--r--service/java/com/android/server/bluetooth/BluetoothManagerService.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/service/java/com/android/server/bluetooth/BluetoothManagerService.java b/service/java/com/android/server/bluetooth/BluetoothManagerService.java
index 707ac322d5..bf28603b06 100644
--- a/service/java/com/android/server/bluetooth/BluetoothManagerService.java
+++ b/service/java/com/android/server/bluetooth/BluetoothManagerService.java
@@ -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="