mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
202033c013
This adds 3 expat patches for n-asb-2022-09 from https://github.com/syphyr/android_external_expat/commits/cm-14.1 and also applies 2 of them to 15.1 Signed-off-by: Tad <tad@spotco.us>
31 lines
1.3 KiB
Diff
31 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Rahul Sabnis <rahulsabnis@google.com>
|
|
Date: Wed, 6 Apr 2022 18:08:18 +0000
|
|
Subject: [PATCH] Removes app access to BluetoothAdapter#setScanMode by
|
|
requiring BLUETOOTH_PRIVILEGED permission.
|
|
|
|
Bug: 203431023
|
|
Test: Manual
|
|
Merged-In: I50d5ed327a7c90a3f73a9924e5b2b66310dff76c
|
|
Change-Id: I50d5ed327a7c90a3f73a9924e5b2b66310dff76c
|
|
(cherry picked from commit 95cbb22647ef5e4505f64d97b7dcbfad2a9fb0e0)
|
|
Merged-In: I50d5ed327a7c90a3f73a9924e5b2b66310dff76c
|
|
---
|
|
src/com/android/bluetooth/btservice/AdapterService.java | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/com/android/bluetooth/btservice/AdapterService.java b/src/com/android/bluetooth/btservice/AdapterService.java
|
|
index 9ecb0bb7b..753b0a298 100644
|
|
--- a/src/com/android/bluetooth/btservice/AdapterService.java
|
|
+++ b/src/com/android/bluetooth/btservice/AdapterService.java
|
|
@@ -1625,7 +1625,8 @@ public class AdapterService extends Service {
|
|
}
|
|
|
|
boolean setScanMode(int mode, int duration) {
|
|
- enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
|
|
+ enforceCallingOrSelfPermission(BLUETOOTH_PRIVILEGED,
|
|
+ "Need BLUETOOTH PRIVILEGED permission");
|
|
|
|
setDiscoverableTimeout(duration);
|
|
int newMode = convertScanModeToHal(mode);
|