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

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

Change-Id: Ic2b5ce12110773fde15da68cc93457b7544a9e48
This commit is contained in:
Treehugger Robot
2021-08-14 01:09:59 +00:00
committed by Automerger Merge Worker

View File

@@ -2430,7 +2430,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
try { try {
foregroundUser = ActivityManager.getCurrentUser(); foregroundUser = ActivityManager.getCurrentUser();
valid = (callingUser == foregroundUser) || parentUser == foregroundUser valid = (callingUser == foregroundUser) || parentUser == foregroundUser
|| callingAppId == Process.NFC_UID || callingAppId == mSystemUiUid; || callingAppId == Process.NFC_UID || callingAppId == mSystemUiUid
|| callingAppId == Process.SHELL_UID;
if (DBG && !valid) { if (DBG && !valid) {
Slog.d(TAG, "checkIfCallerIsForegroundUser: valid=" + valid + " callingUser=" Slog.d(TAG, "checkIfCallerIsForegroundUser: valid=" + valid + " callingUser="
+ callingUser + " parentUser=" + parentUser + " foregroundUser=" + callingUser + " parentUser=" + parentUser + " foregroundUser="