Loading android/app/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerService.java +5 −1 Original line number Diff line number Diff line Loading @@ -364,12 +364,16 @@ public class AvrcpControllerService extends ProfileService { } //Binder object: Must be static class or memory leak may occur private static class AvrcpControllerServiceBinder extends IBluetoothAvrcpController.Stub @VisibleForTesting static class AvrcpControllerServiceBinder extends IBluetoothAvrcpController.Stub implements IProfileServiceBinder { private AvrcpControllerService mService; @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) private AvrcpControllerService getService(AttributionSource source) { if (Utils.isInstrumentationTestMode()) { return mService; } if (!Utils.checkServiceAvailable(mService, TAG) || !Utils.checkCallerIsSystemOrActiveOrManagedUser(mService, TAG) || !Utils.checkConnectPermissionForDataDelivery(mService, source, TAG)) { Loading android/app/src/com/android/bluetooth/hfpclient/HeadsetClientService.java +6 −2 Original line number Diff line number Diff line Loading @@ -259,7 +259,8 @@ public class HeadsetClientService extends ProfileService { /** * Handlers for incoming service calls */ private static class BluetoothHeadsetClientBinder extends IBluetoothHeadsetClient.Stub @VisibleForTesting static class BluetoothHeadsetClientBinder extends IBluetoothHeadsetClient.Stub implements IProfileServiceBinder { private HeadsetClientService mService; Loading @@ -274,6 +275,9 @@ public class HeadsetClientService extends ProfileService { @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) private HeadsetClientService getService(AttributionSource source) { if (Utils.isInstrumentationTestMode()) { return mService; } if (!Utils.checkServiceAvailable(mService, TAG) || !Utils.checkCallerIsSystemOrActiveOrManagedUser(mService, TAG) || !Utils.checkConnectPermissionForDataDelivery(mService, source, TAG)) { Loading Loading @@ -774,7 +778,7 @@ public class HeadsetClientService extends ProfileService { return connectedDevices; } private List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) { List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) { List<BluetoothDevice> devices = new ArrayList<BluetoothDevice>(); synchronized (mStateMachineMap) { for (BluetoothDevice bd : mStateMachineMap.keySet()) { Loading android/app/src/com/android/bluetooth/hid/HidHostService.java +5 −1 Original line number Diff line number Diff line Loading @@ -325,7 +325,8 @@ public class HidHostService extends ProfileService { /** * Handlers for incoming service calls */ private static class BluetoothHidHostBinder extends IBluetoothHidHost.Stub @VisibleForTesting static class BluetoothHidHostBinder extends IBluetoothHidHost.Stub implements IProfileServiceBinder { private HidHostService mService; Loading @@ -340,6 +341,9 @@ public class HidHostService extends ProfileService { @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) private HidHostService getService(AttributionSource source) { if (Utils.isInstrumentationTestMode()) { return mService; } if (!Utils.checkServiceAvailable(mService, TAG) || !Utils.checkCallerIsSystemOrActiveOrManagedUser(mService, TAG) || !Utils.checkConnectPermissionForDataDelivery(mService, source, TAG)) { Loading android/app/src/com/android/bluetooth/map/BluetoothMapService.java +6 −2 Original line number Diff line number Diff line Loading @@ -556,7 +556,7 @@ public class BluetoothMapService extends ProfileService { } } private List<BluetoothDevice> getConnectedDevices() { List<BluetoothDevice> getConnectedDevices() { List<BluetoothDevice> devices = new ArrayList<>(); synchronized (this) { if (mState == BluetoothMap.STATE_CONNECTED && sRemoteDevice != null) { Loading Loading @@ -1209,12 +1209,16 @@ public class BluetoothMapService extends ProfileService { * This class implements the IBluetoothMap interface - or actually it validates the * preconditions for calling the actual functionality in the MapService, and calls it. */ private static class BluetoothMapBinder extends IBluetoothMap.Stub @VisibleForTesting static class BluetoothMapBinder extends IBluetoothMap.Stub implements IProfileServiceBinder { private BluetoothMapService mService; @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) private BluetoothMapService getService(AttributionSource source) { if (Utils.isInstrumentationTestMode()) { return mService; } if (!Utils.checkServiceAvailable(mService, TAG) || !Utils.checkCallerIsSystemOrActiveOrManagedUser(mService, TAG) || !Utils.checkConnectPermissionForDataDelivery(mService, source, TAG)) { Loading android/app/src/com/android/bluetooth/pan/PanService.java +5 −1 Original line number Diff line number Diff line Loading @@ -270,7 +270,8 @@ public class PanService extends ProfileService { /** * Handlers for incoming service calls */ private static class BluetoothPanBinder extends IBluetoothPan.Stub @VisibleForTesting static class BluetoothPanBinder extends IBluetoothPan.Stub implements IProfileServiceBinder { private PanService mService; Loading @@ -285,6 +286,9 @@ public class PanService extends ProfileService { @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) private PanService getService(AttributionSource source) { if (Utils.isInstrumentationTestMode()) { return mService; } if (!Utils.checkServiceAvailable(mService, TAG) || !Utils.checkCallerIsSystemOrActiveOrManagedUser(mService, TAG) || !Utils.checkConnectPermissionForDataDelivery(mService, source, TAG)) { Loading Loading
android/app/src/com/android/bluetooth/avrcpcontroller/AvrcpControllerService.java +5 −1 Original line number Diff line number Diff line Loading @@ -364,12 +364,16 @@ public class AvrcpControllerService extends ProfileService { } //Binder object: Must be static class or memory leak may occur private static class AvrcpControllerServiceBinder extends IBluetoothAvrcpController.Stub @VisibleForTesting static class AvrcpControllerServiceBinder extends IBluetoothAvrcpController.Stub implements IProfileServiceBinder { private AvrcpControllerService mService; @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) private AvrcpControllerService getService(AttributionSource source) { if (Utils.isInstrumentationTestMode()) { return mService; } if (!Utils.checkServiceAvailable(mService, TAG) || !Utils.checkCallerIsSystemOrActiveOrManagedUser(mService, TAG) || !Utils.checkConnectPermissionForDataDelivery(mService, source, TAG)) { Loading
android/app/src/com/android/bluetooth/hfpclient/HeadsetClientService.java +6 −2 Original line number Diff line number Diff line Loading @@ -259,7 +259,8 @@ public class HeadsetClientService extends ProfileService { /** * Handlers for incoming service calls */ private static class BluetoothHeadsetClientBinder extends IBluetoothHeadsetClient.Stub @VisibleForTesting static class BluetoothHeadsetClientBinder extends IBluetoothHeadsetClient.Stub implements IProfileServiceBinder { private HeadsetClientService mService; Loading @@ -274,6 +275,9 @@ public class HeadsetClientService extends ProfileService { @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) private HeadsetClientService getService(AttributionSource source) { if (Utils.isInstrumentationTestMode()) { return mService; } if (!Utils.checkServiceAvailable(mService, TAG) || !Utils.checkCallerIsSystemOrActiveOrManagedUser(mService, TAG) || !Utils.checkConnectPermissionForDataDelivery(mService, source, TAG)) { Loading Loading @@ -774,7 +778,7 @@ public class HeadsetClientService extends ProfileService { return connectedDevices; } private List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) { List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) { List<BluetoothDevice> devices = new ArrayList<BluetoothDevice>(); synchronized (mStateMachineMap) { for (BluetoothDevice bd : mStateMachineMap.keySet()) { Loading
android/app/src/com/android/bluetooth/hid/HidHostService.java +5 −1 Original line number Diff line number Diff line Loading @@ -325,7 +325,8 @@ public class HidHostService extends ProfileService { /** * Handlers for incoming service calls */ private static class BluetoothHidHostBinder extends IBluetoothHidHost.Stub @VisibleForTesting static class BluetoothHidHostBinder extends IBluetoothHidHost.Stub implements IProfileServiceBinder { private HidHostService mService; Loading @@ -340,6 +341,9 @@ public class HidHostService extends ProfileService { @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) private HidHostService getService(AttributionSource source) { if (Utils.isInstrumentationTestMode()) { return mService; } if (!Utils.checkServiceAvailable(mService, TAG) || !Utils.checkCallerIsSystemOrActiveOrManagedUser(mService, TAG) || !Utils.checkConnectPermissionForDataDelivery(mService, source, TAG)) { Loading
android/app/src/com/android/bluetooth/map/BluetoothMapService.java +6 −2 Original line number Diff line number Diff line Loading @@ -556,7 +556,7 @@ public class BluetoothMapService extends ProfileService { } } private List<BluetoothDevice> getConnectedDevices() { List<BluetoothDevice> getConnectedDevices() { List<BluetoothDevice> devices = new ArrayList<>(); synchronized (this) { if (mState == BluetoothMap.STATE_CONNECTED && sRemoteDevice != null) { Loading Loading @@ -1209,12 +1209,16 @@ public class BluetoothMapService extends ProfileService { * This class implements the IBluetoothMap interface - or actually it validates the * preconditions for calling the actual functionality in the MapService, and calls it. */ private static class BluetoothMapBinder extends IBluetoothMap.Stub @VisibleForTesting static class BluetoothMapBinder extends IBluetoothMap.Stub implements IProfileServiceBinder { private BluetoothMapService mService; @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) private BluetoothMapService getService(AttributionSource source) { if (Utils.isInstrumentationTestMode()) { return mService; } if (!Utils.checkServiceAvailable(mService, TAG) || !Utils.checkCallerIsSystemOrActiveOrManagedUser(mService, TAG) || !Utils.checkConnectPermissionForDataDelivery(mService, source, TAG)) { Loading
android/app/src/com/android/bluetooth/pan/PanService.java +5 −1 Original line number Diff line number Diff line Loading @@ -270,7 +270,8 @@ public class PanService extends ProfileService { /** * Handlers for incoming service calls */ private static class BluetoothPanBinder extends IBluetoothPan.Stub @VisibleForTesting static class BluetoothPanBinder extends IBluetoothPan.Stub implements IProfileServiceBinder { private PanService mService; Loading @@ -285,6 +286,9 @@ public class PanService extends ProfileService { @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) private PanService getService(AttributionSource source) { if (Utils.isInstrumentationTestMode()) { return mService; } if (!Utils.checkServiceAvailable(mService, TAG) || !Utils.checkCallerIsSystemOrActiveOrManagedUser(mService, TAG) || !Utils.checkConnectPermissionForDataDelivery(mService, source, TAG)) { Loading