Loading android/app/src/com/android/bluetooth/hfp/HeadsetService.java +4 −4 Original line number Diff line number Diff line Loading @@ -669,7 +669,7 @@ public class HeadsetService extends ProfileService { } boolean disconnect(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH ADMIN permission"); enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); synchronized (mStateMachines) { Log.i(TAG, "disconnect: device=" + device); HeadsetStateMachine stateMachine = mStateMachines.get(device); Loading Loading @@ -947,7 +947,7 @@ public class HeadsetService extends ProfileService { * @return the active device or null if no device is active */ public BluetoothDevice getActiveDevice() { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH_PERM permission"); enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); synchronized (mStateMachines) { return mActiveDevice; } Loading Loading @@ -1050,7 +1050,7 @@ public class HeadsetService extends ProfileService { } boolean startScoUsingVirtualVoiceCall(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH permission"); enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); synchronized (mStateMachines) { final HeadsetStateMachine stateMachine = mStateMachines.get(device); if (stateMachine == null) { Loading @@ -1064,7 +1064,7 @@ public class HeadsetService extends ProfileService { } boolean stopScoUsingVirtualVoiceCall(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH permission"); enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); synchronized (mStateMachines) { final HeadsetStateMachine stateMachine = mStateMachines.get(device); if (stateMachine == null) { Loading Loading
android/app/src/com/android/bluetooth/hfp/HeadsetService.java +4 −4 Original line number Diff line number Diff line Loading @@ -669,7 +669,7 @@ public class HeadsetService extends ProfileService { } boolean disconnect(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH ADMIN permission"); enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); synchronized (mStateMachines) { Log.i(TAG, "disconnect: device=" + device); HeadsetStateMachine stateMachine = mStateMachines.get(device); Loading Loading @@ -947,7 +947,7 @@ public class HeadsetService extends ProfileService { * @return the active device or null if no device is active */ public BluetoothDevice getActiveDevice() { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH_PERM permission"); enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); synchronized (mStateMachines) { return mActiveDevice; } Loading Loading @@ -1050,7 +1050,7 @@ public class HeadsetService extends ProfileService { } boolean startScoUsingVirtualVoiceCall(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH permission"); enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); synchronized (mStateMachines) { final HeadsetStateMachine stateMachine = mStateMachines.get(device); if (stateMachine == null) { Loading @@ -1064,7 +1064,7 @@ public class HeadsetService extends ProfileService { } boolean stopScoUsingVirtualVoiceCall(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH permission"); enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); synchronized (mStateMachines) { final HeadsetStateMachine stateMachine = mStateMachines.get(device); if (stateMachine == null) { Loading