Loading Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ java_defaults { "-Xep:ClassCanBeStatic:ERROR", "-Xep:DateFormatConstant:ERROR", "-Xep:DirectInvocationOnMock:ERROR", "-Xep:DuplicateBranches:ERROR", "-Xep:EmptyBlockTag:ERROR", "-Xep:EmptyCatch:ERROR", "-Xep:EnumOrdinal:ERROR", Loading Loading @@ -152,6 +153,7 @@ java_defaults { "-Xep:NullableVoid:ERROR", "-Xep:ObjectEqualsForPrimitives:ERROR", "-Xep:OperatorPrecedence:ERROR", "-Xep:RedundantControlFlow:ERROR", "-Xep:ReferenceEquality:ERROR", "-Xep:ReturnAtTheEndOfVoidFunction:ERROR", "-Xep:ReturnFromVoid:ERROR", Loading android/app/src/com/android/bluetooth/bass_client/BassClientService.java +16 −18 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.bluetooth.bass_client; import static android.Manifest.permission.BLUETOOTH_CONNECT; import static android.Manifest.permission.BLUETOOTH_PRIVILEGED; import static android.Manifest.permission.BLUETOOTH_SCAN; import static android.bluetooth.BluetoothProfile.STATE_CONNECTED; import static android.bluetooth.IBluetoothLeAudio.LE_AUDIO_GROUP_ID_INVALID; import static com.android.bluetooth.flags.Flags.leaudioAllowedContextMask; Loading Loading @@ -1532,7 +1533,7 @@ public class BassClientService extends ProfileService { return BluetoothStatusCodes.ERROR_BAD_PARAMETERS; } if (getConnectionState(device) != BluetoothProfile.STATE_CONNECTED) { if (getConnectionState(device) != STATE_CONNECTED) { log("validateParameters: device is not connected, device: " + device); return BluetoothStatusCodes.ERROR_REMOTE_LINK_ERROR; } Loading Loading @@ -1661,10 +1662,10 @@ public class BassClientService extends ProfileService { } /* Restore allowed context mask for unicast in case if last connected broadcast * delegator device which has external source disconnectes. * delegator device which has external source disconnects. */ checkAndResetGroupAllowedContextMask(); } else if (toState == BluetoothProfile.STATE_CONNECTED) { } else if (toState == STATE_CONNECTED) { handleReconnectingAudioSharingModeDevice(device); } } Loading Loading @@ -3579,7 +3580,7 @@ public class BassClientService extends ProfileService { if (devices.stream() .anyMatch( d -> ((getConnectionState(d) == BluetoothProfile.STATE_CONNECTED) ((getConnectionState(d) == STATE_CONNECTED) && leAudioService.isPrimaryDevice(d)))) { continue; } Loading @@ -3600,8 +3601,7 @@ public class BassClientService extends ProfileService { d -> !d.equals(sink) && (getConnectionState(d) == BluetoothProfile .STATE_CONNECTED))) { == STATE_CONNECTED))) { iterator.remove(); leAudioService.stopBroadcast(broadcastId); continue; Loading @@ -3612,10 +3612,9 @@ public class BassClientService extends ProfileService { .anyMatch( d -> !d.equals(sink) && (getConnectionState(d) == BluetoothProfile.STATE_CONNECTED))) { && (getConnectionState(d) == STATE_CONNECTED))) { continue; } else { } Log.d( TAG, "handleUnintendedDeviceDisconnection: No more potential broadcast " Loading @@ -3627,7 +3626,6 @@ public class BassClientService extends ProfileService { } } } } /** Handle device newly connected and its peer device still has active source */ private void checkAndResumeBroadcast(BluetoothDevice sink) { Loading Loading @@ -4185,7 +4183,7 @@ public class BassClientService extends ProfileService { try { invokeCallback(callback, msg); } catch (RemoteException e) { continue; // Ignore exception } } mCallbacksList.finishBroadcast(); Loading android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java +0 −2 Original line number Diff line number Diff line Loading @@ -649,8 +649,6 @@ public class HeadsetClientStateMachine extends StateMachine { action = HeadsetClientHalConstants.CALL_ACTION_CHLD_1; } else if (getCall(HfpClientCall.CALL_STATE_ACTIVE) != null) { action = HeadsetClientHalConstants.CALL_ACTION_CHLD_3; } else if (flag == BluetoothHeadsetClient.CALL_ACCEPT_NONE) { action = HeadsetClientHalConstants.CALL_ACTION_CHLD_2; } else { action = HeadsetClientHalConstants.CALL_ACTION_CHLD_2; } Loading android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +14 −14 Original line number Diff line number Diff line Loading @@ -2900,7 +2900,7 @@ public class LeAudioService extends ProfileService { .getBroadcastItem(i) .onGroupStreamStatusChanged(groupId, groupStreamStatus); } catch (RemoteException e) { continue; // Ignore Exception } } mLeAudioCallbacks.finishBroadcast(); Loading @@ -2916,7 +2916,7 @@ public class LeAudioService extends ProfileService { .getBroadcastItem(i) .onBroadcastToUnicastFallbackGroupChanged(groupId); } catch (RemoteException e) { continue; // Ignore Exception } } mLeAudioCallbacks.finishBroadcast(); Loading Loading @@ -4768,7 +4768,7 @@ public class LeAudioService extends ProfileService { try { mLeAudioCallbacks.getBroadcastItem(i).onGroupNodeAdded(device, groupId); } catch (RemoteException e) { continue; // Ignore Exception } } mLeAudioCallbacks.finishBroadcast(); Loading Loading @@ -4847,7 +4847,7 @@ public class LeAudioService extends ProfileService { try { mLeAudioCallbacks.getBroadcastItem(i).onGroupNodeRemoved(device, groupId); } catch (RemoteException e) { continue; // Ignore Exception } } mLeAudioCallbacks.finishBroadcast(); Loading @@ -4861,7 +4861,7 @@ public class LeAudioService extends ProfileService { try { mLeAudioCallbacks.getBroadcastItem(i).onGroupStatusChanged(groupId, status); } catch (RemoteException e) { continue; // Ignore Exception } } mLeAudioCallbacks.finishBroadcast(); Loading @@ -4875,7 +4875,7 @@ public class LeAudioService extends ProfileService { try { mLeAudioCallbacks.getBroadcastItem(i).onCodecConfigChanged(groupId, status); } catch (RemoteException e) { continue; // Ignore Exception } } mLeAudioCallbacks.finishBroadcast(); Loading @@ -4889,7 +4889,7 @@ public class LeAudioService extends ProfileService { try { mBroadcastCallbacks.getBroadcastItem(i).onBroadcastStarted(reason, broadcastId); } catch (RemoteException e) { continue; // Ignore Exception } } mBroadcastCallbacks.finishBroadcast(); Loading @@ -4903,7 +4903,7 @@ public class LeAudioService extends ProfileService { try { mBroadcastCallbacks.getBroadcastItem(i).onBroadcastStartFailed(reason); } catch (RemoteException e) { continue; // Ignore Exception } } mBroadcastCallbacks.finishBroadcast(); Loading @@ -4917,7 +4917,7 @@ public class LeAudioService extends ProfileService { try { mBroadcastCallbacks.getBroadcastItem(i).onBroadcastStopped(reason, broadcastId); } catch (RemoteException e) { continue; // Ignore Exception } } mBroadcastCallbacks.finishBroadcast(); Loading @@ -4931,7 +4931,7 @@ public class LeAudioService extends ProfileService { try { mBroadcastCallbacks.getBroadcastItem(i).onBroadcastStopFailed(reason); } catch (RemoteException e) { continue; // Ignore Exception } } mBroadcastCallbacks.finishBroadcast(); Loading @@ -4945,7 +4945,7 @@ public class LeAudioService extends ProfileService { try { mBroadcastCallbacks.getBroadcastItem(i).onPlaybackStarted(reason, broadcastId); } catch (RemoteException e) { continue; // Ignore Exception } } mBroadcastCallbacks.finishBroadcast(); Loading @@ -4959,7 +4959,7 @@ public class LeAudioService extends ProfileService { try { mBroadcastCallbacks.getBroadcastItem(i).onPlaybackStopped(reason, broadcastId); } catch (RemoteException e) { continue; // Ignore Exception } } mBroadcastCallbacks.finishBroadcast(); Loading @@ -4975,7 +4975,7 @@ public class LeAudioService extends ProfileService { .getBroadcastItem(i) .onBroadcastUpdateFailed(reason, broadcastId); } catch (RemoteException e) { continue; // Ignore Exception } } mBroadcastCallbacks.finishBroadcast(); Loading @@ -4992,7 +4992,7 @@ public class LeAudioService extends ProfileService { .getBroadcastItem(i) .onBroadcastMetadataChanged(broadcastId, metadata); } catch (RemoteException e) { continue; // Ignore Exception } } mBroadcastCallbacks.finishBroadcast(); Loading android/app/src/com/android/bluetooth/map/BluetoothMapContent.java +0 −2 Original line number Diff line number Diff line Loading @@ -3483,8 +3483,6 @@ public class BluetoothMapContent { BluetoothProtoEnums.BLUETOOTH_MAP_CONTENT, BluetoothStatsLog.BLUETOOTH_CONTENT_PROFILE_ERROR_REPORTED__TYPE__EXCEPTION, 4); // skip this id continue; } } Loading Loading
Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ java_defaults { "-Xep:ClassCanBeStatic:ERROR", "-Xep:DateFormatConstant:ERROR", "-Xep:DirectInvocationOnMock:ERROR", "-Xep:DuplicateBranches:ERROR", "-Xep:EmptyBlockTag:ERROR", "-Xep:EmptyCatch:ERROR", "-Xep:EnumOrdinal:ERROR", Loading Loading @@ -152,6 +153,7 @@ java_defaults { "-Xep:NullableVoid:ERROR", "-Xep:ObjectEqualsForPrimitives:ERROR", "-Xep:OperatorPrecedence:ERROR", "-Xep:RedundantControlFlow:ERROR", "-Xep:ReferenceEquality:ERROR", "-Xep:ReturnAtTheEndOfVoidFunction:ERROR", "-Xep:ReturnFromVoid:ERROR", Loading
android/app/src/com/android/bluetooth/bass_client/BassClientService.java +16 −18 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.bluetooth.bass_client; import static android.Manifest.permission.BLUETOOTH_CONNECT; import static android.Manifest.permission.BLUETOOTH_PRIVILEGED; import static android.Manifest.permission.BLUETOOTH_SCAN; import static android.bluetooth.BluetoothProfile.STATE_CONNECTED; import static android.bluetooth.IBluetoothLeAudio.LE_AUDIO_GROUP_ID_INVALID; import static com.android.bluetooth.flags.Flags.leaudioAllowedContextMask; Loading Loading @@ -1532,7 +1533,7 @@ public class BassClientService extends ProfileService { return BluetoothStatusCodes.ERROR_BAD_PARAMETERS; } if (getConnectionState(device) != BluetoothProfile.STATE_CONNECTED) { if (getConnectionState(device) != STATE_CONNECTED) { log("validateParameters: device is not connected, device: " + device); return BluetoothStatusCodes.ERROR_REMOTE_LINK_ERROR; } Loading Loading @@ -1661,10 +1662,10 @@ public class BassClientService extends ProfileService { } /* Restore allowed context mask for unicast in case if last connected broadcast * delegator device which has external source disconnectes. * delegator device which has external source disconnects. */ checkAndResetGroupAllowedContextMask(); } else if (toState == BluetoothProfile.STATE_CONNECTED) { } else if (toState == STATE_CONNECTED) { handleReconnectingAudioSharingModeDevice(device); } } Loading Loading @@ -3579,7 +3580,7 @@ public class BassClientService extends ProfileService { if (devices.stream() .anyMatch( d -> ((getConnectionState(d) == BluetoothProfile.STATE_CONNECTED) ((getConnectionState(d) == STATE_CONNECTED) && leAudioService.isPrimaryDevice(d)))) { continue; } Loading @@ -3600,8 +3601,7 @@ public class BassClientService extends ProfileService { d -> !d.equals(sink) && (getConnectionState(d) == BluetoothProfile .STATE_CONNECTED))) { == STATE_CONNECTED))) { iterator.remove(); leAudioService.stopBroadcast(broadcastId); continue; Loading @@ -3612,10 +3612,9 @@ public class BassClientService extends ProfileService { .anyMatch( d -> !d.equals(sink) && (getConnectionState(d) == BluetoothProfile.STATE_CONNECTED))) { && (getConnectionState(d) == STATE_CONNECTED))) { continue; } else { } Log.d( TAG, "handleUnintendedDeviceDisconnection: No more potential broadcast " Loading @@ -3627,7 +3626,6 @@ public class BassClientService extends ProfileService { } } } } /** Handle device newly connected and its peer device still has active source */ private void checkAndResumeBroadcast(BluetoothDevice sink) { Loading Loading @@ -4185,7 +4183,7 @@ public class BassClientService extends ProfileService { try { invokeCallback(callback, msg); } catch (RemoteException e) { continue; // Ignore exception } } mCallbacksList.finishBroadcast(); Loading
android/app/src/com/android/bluetooth/hfpclient/HeadsetClientStateMachine.java +0 −2 Original line number Diff line number Diff line Loading @@ -649,8 +649,6 @@ public class HeadsetClientStateMachine extends StateMachine { action = HeadsetClientHalConstants.CALL_ACTION_CHLD_1; } else if (getCall(HfpClientCall.CALL_STATE_ACTIVE) != null) { action = HeadsetClientHalConstants.CALL_ACTION_CHLD_3; } else if (flag == BluetoothHeadsetClient.CALL_ACCEPT_NONE) { action = HeadsetClientHalConstants.CALL_ACTION_CHLD_2; } else { action = HeadsetClientHalConstants.CALL_ACTION_CHLD_2; } Loading
android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +14 −14 Original line number Diff line number Diff line Loading @@ -2900,7 +2900,7 @@ public class LeAudioService extends ProfileService { .getBroadcastItem(i) .onGroupStreamStatusChanged(groupId, groupStreamStatus); } catch (RemoteException e) { continue; // Ignore Exception } } mLeAudioCallbacks.finishBroadcast(); Loading @@ -2916,7 +2916,7 @@ public class LeAudioService extends ProfileService { .getBroadcastItem(i) .onBroadcastToUnicastFallbackGroupChanged(groupId); } catch (RemoteException e) { continue; // Ignore Exception } } mLeAudioCallbacks.finishBroadcast(); Loading Loading @@ -4768,7 +4768,7 @@ public class LeAudioService extends ProfileService { try { mLeAudioCallbacks.getBroadcastItem(i).onGroupNodeAdded(device, groupId); } catch (RemoteException e) { continue; // Ignore Exception } } mLeAudioCallbacks.finishBroadcast(); Loading Loading @@ -4847,7 +4847,7 @@ public class LeAudioService extends ProfileService { try { mLeAudioCallbacks.getBroadcastItem(i).onGroupNodeRemoved(device, groupId); } catch (RemoteException e) { continue; // Ignore Exception } } mLeAudioCallbacks.finishBroadcast(); Loading @@ -4861,7 +4861,7 @@ public class LeAudioService extends ProfileService { try { mLeAudioCallbacks.getBroadcastItem(i).onGroupStatusChanged(groupId, status); } catch (RemoteException e) { continue; // Ignore Exception } } mLeAudioCallbacks.finishBroadcast(); Loading @@ -4875,7 +4875,7 @@ public class LeAudioService extends ProfileService { try { mLeAudioCallbacks.getBroadcastItem(i).onCodecConfigChanged(groupId, status); } catch (RemoteException e) { continue; // Ignore Exception } } mLeAudioCallbacks.finishBroadcast(); Loading @@ -4889,7 +4889,7 @@ public class LeAudioService extends ProfileService { try { mBroadcastCallbacks.getBroadcastItem(i).onBroadcastStarted(reason, broadcastId); } catch (RemoteException e) { continue; // Ignore Exception } } mBroadcastCallbacks.finishBroadcast(); Loading @@ -4903,7 +4903,7 @@ public class LeAudioService extends ProfileService { try { mBroadcastCallbacks.getBroadcastItem(i).onBroadcastStartFailed(reason); } catch (RemoteException e) { continue; // Ignore Exception } } mBroadcastCallbacks.finishBroadcast(); Loading @@ -4917,7 +4917,7 @@ public class LeAudioService extends ProfileService { try { mBroadcastCallbacks.getBroadcastItem(i).onBroadcastStopped(reason, broadcastId); } catch (RemoteException e) { continue; // Ignore Exception } } mBroadcastCallbacks.finishBroadcast(); Loading @@ -4931,7 +4931,7 @@ public class LeAudioService extends ProfileService { try { mBroadcastCallbacks.getBroadcastItem(i).onBroadcastStopFailed(reason); } catch (RemoteException e) { continue; // Ignore Exception } } mBroadcastCallbacks.finishBroadcast(); Loading @@ -4945,7 +4945,7 @@ public class LeAudioService extends ProfileService { try { mBroadcastCallbacks.getBroadcastItem(i).onPlaybackStarted(reason, broadcastId); } catch (RemoteException e) { continue; // Ignore Exception } } mBroadcastCallbacks.finishBroadcast(); Loading @@ -4959,7 +4959,7 @@ public class LeAudioService extends ProfileService { try { mBroadcastCallbacks.getBroadcastItem(i).onPlaybackStopped(reason, broadcastId); } catch (RemoteException e) { continue; // Ignore Exception } } mBroadcastCallbacks.finishBroadcast(); Loading @@ -4975,7 +4975,7 @@ public class LeAudioService extends ProfileService { .getBroadcastItem(i) .onBroadcastUpdateFailed(reason, broadcastId); } catch (RemoteException e) { continue; // Ignore Exception } } mBroadcastCallbacks.finishBroadcast(); Loading @@ -4992,7 +4992,7 @@ public class LeAudioService extends ProfileService { .getBroadcastItem(i) .onBroadcastMetadataChanged(broadcastId, metadata); } catch (RemoteException e) { continue; // Ignore Exception } } mBroadcastCallbacks.finishBroadcast(); Loading
android/app/src/com/android/bluetooth/map/BluetoothMapContent.java +0 −2 Original line number Diff line number Diff line Loading @@ -3483,8 +3483,6 @@ public class BluetoothMapContent { BluetoothProtoEnums.BLUETOOTH_MAP_CONTENT, BluetoothStatsLog.BLUETOOTH_CONTENT_PROFILE_ERROR_REPORTED__TYPE__EXCEPTION, 4); // skip this id continue; } } Loading