summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Myles Watson <mylesgw@google.com> 2021-08-13 16:03:12 -0700
committer Karthik Ramakrishnan <karthikmr@google.com> 2021-08-17 10:04:00 -0700
commit002dfe73e1716fe590554662aeaffb74337263fd (patch)
tree95a8d1314de30d220314233444230cc296f568d5
parent3d3db4b67611b916563721177d872a52c806ec12 (diff)
Allow SHELL_UID to disable Bluetooth for testing
Bug: 189952422 Test: atest VtsHalBluetoothV1_0TargetTest Change-Id: Id45a43b824b2be49fb38686f9582484931024187 Merged-In: Id45a43b824b2be49fb38686f9582484931024187
-rw-r--r--services/core/java/com/android/server/BluetoothManagerService.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java
index b7c61a0d25cf..dc7904ddf8ec 100644
--- a/services/core/java/com/android/server/BluetoothManagerService.java
+++ b/services/core/java/com/android/server/BluetoothManagerService.java
@@ -2479,7 +2479,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="