Loading android/app/src/com/android/bluetooth/Utils.java +11 −2 Original line number Diff line number Diff line Loading @@ -982,7 +982,17 @@ public final class Utils { return 1 == context.getContentResolver().update(uri, values, null, null); } /** * Returns bundled broadcast options. */ public static @NonNull Bundle getTempAllowlistBroadcastOptions() { return getTempBroadcastOptions().toBundle(); } /** * Returns broadcast options. */ public static @NonNull BroadcastOptions getTempBroadcastOptions() { // Use the Bluetooth process identity to pass permission check when reading DeviceConfig final long ident = Binder.clearCallingIdentity(); final BroadcastOptions bOptions = BroadcastOptions.makeBasic(); Loading @@ -995,9 +1005,8 @@ public final class Utils { } finally { Binder.restoreCallingIdentity(ident); } return bOptions.toBundle(); return bOptions; } /** * Checks that value is present as at least one of the elements of the array. * @param array the array to check in Loading android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +2 −2 Original line number Diff line number Diff line Loading @@ -718,11 +718,11 @@ final class RemoteDevices { if (pkg.getPermission() != null) { sAdapterService.sendBroadcastMultiplePermissions(intent, new String[] { BLUETOOTH_SCAN, pkg.getPermission() }, Utils.getTempAllowlistBroadcastOptions()); Utils.getTempBroadcastOptions()); } else { sAdapterService.sendBroadcastMultiplePermissions(intent, new String[] { BLUETOOTH_SCAN }, Utils.getTempAllowlistBroadcastOptions()); Utils.getTempBroadcastOptions()); } } } Loading android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java +1 −1 Original line number Diff line number Diff line Loading @@ -1934,7 +1934,7 @@ public class HeadsetClientStateMachine extends StateMachine { mService.sendBroadcastMultiplePermissions(intent, new String[] {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}, Utils.getTempAllowlistBroadcastOptions()); Utils.getTempBroadcastOptions()); HfpClientConnectionService.onConnectionStateChanged(device, newState, prevState); } Loading android/app/src/com/android/bluetooth/mapclient/MceStateMachine.java +1 −1 Original line number Diff line number Diff line Loading @@ -242,7 +242,7 @@ class MceStateMachine extends StateMachine { intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); mService.sendBroadcastMultiplePermissions(intent, new String[] {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}, Utils.getTempAllowlistBroadcastOptions()); Utils.getTempBroadcastOptions()); } public synchronized int getState() { Loading android/app/src/com/android/bluetooth/pbapclient/PbapClientStateMachine.java +1 −1 Original line number Diff line number Diff line Loading @@ -360,7 +360,7 @@ final class PbapClientStateMachine extends StateMachine { intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); mService.sendBroadcastMultiplePermissions(intent, new String[] {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}, Utils.getTempAllowlistBroadcastOptions()); Utils.getTempBroadcastOptions()); } public void disconnect(BluetoothDevice device) { Loading Loading
android/app/src/com/android/bluetooth/Utils.java +11 −2 Original line number Diff line number Diff line Loading @@ -982,7 +982,17 @@ public final class Utils { return 1 == context.getContentResolver().update(uri, values, null, null); } /** * Returns bundled broadcast options. */ public static @NonNull Bundle getTempAllowlistBroadcastOptions() { return getTempBroadcastOptions().toBundle(); } /** * Returns broadcast options. */ public static @NonNull BroadcastOptions getTempBroadcastOptions() { // Use the Bluetooth process identity to pass permission check when reading DeviceConfig final long ident = Binder.clearCallingIdentity(); final BroadcastOptions bOptions = BroadcastOptions.makeBasic(); Loading @@ -995,9 +1005,8 @@ public final class Utils { } finally { Binder.restoreCallingIdentity(ident); } return bOptions.toBundle(); return bOptions; } /** * Checks that value is present as at least one of the elements of the array. * @param array the array to check in Loading
android/app/src/com/android/bluetooth/btservice/RemoteDevices.java +2 −2 Original line number Diff line number Diff line Loading @@ -718,11 +718,11 @@ final class RemoteDevices { if (pkg.getPermission() != null) { sAdapterService.sendBroadcastMultiplePermissions(intent, new String[] { BLUETOOTH_SCAN, pkg.getPermission() }, Utils.getTempAllowlistBroadcastOptions()); Utils.getTempBroadcastOptions()); } else { sAdapterService.sendBroadcastMultiplePermissions(intent, new String[] { BLUETOOTH_SCAN }, Utils.getTempAllowlistBroadcastOptions()); Utils.getTempBroadcastOptions()); } } } Loading
android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java +1 −1 Original line number Diff line number Diff line Loading @@ -1934,7 +1934,7 @@ public class HeadsetClientStateMachine extends StateMachine { mService.sendBroadcastMultiplePermissions(intent, new String[] {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}, Utils.getTempAllowlistBroadcastOptions()); Utils.getTempBroadcastOptions()); HfpClientConnectionService.onConnectionStateChanged(device, newState, prevState); } Loading
android/app/src/com/android/bluetooth/mapclient/MceStateMachine.java +1 −1 Original line number Diff line number Diff line Loading @@ -242,7 +242,7 @@ class MceStateMachine extends StateMachine { intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); mService.sendBroadcastMultiplePermissions(intent, new String[] {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}, Utils.getTempAllowlistBroadcastOptions()); Utils.getTempBroadcastOptions()); } public synchronized int getState() { Loading
android/app/src/com/android/bluetooth/pbapclient/PbapClientStateMachine.java +1 −1 Original line number Diff line number Diff line Loading @@ -360,7 +360,7 @@ final class PbapClientStateMachine extends StateMachine { intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); mService.sendBroadcastMultiplePermissions(intent, new String[] {BLUETOOTH_CONNECT, BLUETOOTH_PRIVILEGED}, Utils.getTempAllowlistBroadcastOptions()); Utils.getTempBroadcastOptions()); } public void disconnect(BluetoothDevice device) { Loading