Loading android/app/src/com/android/bluetooth/telephony/BluetoothCall.java +2 −2 Original line number Diff line number Diff line Loading @@ -226,7 +226,7 @@ public class BluetoothCall { mCall.removeListener(listener); } public int getGenericConferenceActiveChildCallId() { public Integer getGenericConferenceActiveChildCallId() { return System.identityHashCode(mCall.getGenericConferenceActiveChildCall()); } Loading Loading @@ -284,7 +284,7 @@ public class BluetoothCall { return getDetails().hasProperty(Call.Details.PROPERTY_IS_EXTERNAL_CALL); } public int getId() { public Integer getId() { return System.identityHashCode(mCall); } Loading android/app/src/com/android/bluetooth/telephony/BluetoothInCallService.java +3 −3 Original line number Diff line number Diff line Loading @@ -832,7 +832,7 @@ public class BluetoothInCallService extends InCallService { numHeldCalls = 1; // Merge is available, so expose via numHeldCalls. } for (int id : activeCall.getChildrenIds()) { for (Integer id : activeCall.getChildrenIds()) { // Held BluetoothCall has changed due to it being combined into a CDMA conference. // Keep track of this and ignore any future update since it doesn't really count // as a BluetoothCall change. Loading Loading @@ -978,7 +978,7 @@ public class BluetoothInCallService extends InCallService { } @VisibleForTesting public BluetoothCall getBluetoothCallById(int id) { public BluetoothCall getBluetoothCallById(Integer id) { if (mBluetoothCallHashMap.containsKey(id)) { return mBluetoothCallHashMap.get(id); } Loading @@ -988,7 +988,7 @@ public class BluetoothInCallService extends InCallService { @VisibleForTesting public List<BluetoothCall> getBluetoothCallsByIds(List<Integer> ids) { List<BluetoothCall> calls = new ArrayList<>(); for (int id : ids) { for (Integer id : ids) { BluetoothCall call = getBluetoothCallById(id); if (!mCallInfo.isNullCall(call)) { calls.add(call); Loading android/app/tests/unit/src/com/android/bluetooth/telephony/BluetoothInCallServiceTest.java +8 −8 Original line number Diff line number Diff line Loading @@ -307,7 +307,7 @@ public class BluetoothInCallServiceTest { addCallCapability(parentCall, Connection.CAPABILITY_MERGE_CONFERENCE); addCallCapability(parentCall, Connection.CAPABILITY_SWAP_CONFERENCE); removeCallCapability(parentCall, Connection.CAPABILITY_CONFERENCE_HAS_NO_CHILDREN); int confCall1Id = confCall1.getId(); Integer confCall1Id = confCall1.getId(); when(parentCall.getGenericConferenceActiveChildCallId()) .thenReturn(confCall1Id); when(parentCall.isConference()).thenReturn(true); Loading @@ -315,7 +315,7 @@ public class BluetoothInCallServiceTest { confCall2.getId()); when(parentCall.getChildrenIds()).thenReturn(childrenIds); //Add links from child calls to parent int parentId = parentCall.getId(); Integer parentId = parentCall.getId(); when(confCall1.getParentId()).thenReturn(parentId); when(confCall2.getParentId()).thenReturn(parentId); Loading Loading @@ -369,14 +369,14 @@ public class BluetoothInCallServiceTest { addCallCapability(parentCall, Connection.CAPABILITY_SWAP_CONFERENCE); removeCallCapability(parentCall, Connection.CAPABILITY_CONFERENCE_HAS_NO_CHILDREN); int foregroundCallId = foregroundCall.getId(); Integer foregroundCallId = foregroundCall.getId(); when(parentCall.getGenericConferenceActiveChildCallId()).thenReturn(foregroundCallId); when(parentCall.isConference()).thenReturn(true); List<Integer> childrenIds = Arrays.asList(foregroundCall.getId(), heldCall.getId()); when(parentCall.getChildrenIds()).thenReturn(childrenIds); //Add links from child calls to parent int parentId = parentCall.getId(); Integer parentId = parentCall.getId(); when(foregroundCall.getParentId()).thenReturn(parentId); when(heldCall.getParentId()).thenReturn(parentId); Loading Loading @@ -422,7 +422,7 @@ public class BluetoothInCallServiceTest { confCall2.getId()); when(parentCall.getChildrenIds()).thenReturn(childrenIds); //Add links from child calls to parent int parentId = parentCall.getId(); Integer parentId = parentCall.getId(); when(confCall1.getParentId()).thenReturn(parentId); when(confCall2.getParentId()).thenReturn(parentId); Loading Loading @@ -634,7 +634,7 @@ public class BluetoothInCallServiceTest { mBluetoothInCallService.onCallAdded(childCall2); addCallCapability(parentCall, Connection.CAPABILITY_MANAGE_CONFERENCE); int parentId = parentCall.getId(); Integer parentId = parentCall.getId(); when(childCall1.getParentId()).thenReturn(parentId); when(childCall2.getParentId()).thenReturn(parentId); Loading Loading @@ -1038,7 +1038,7 @@ public class BluetoothInCallServiceTest { mBluetoothInCallService.onCallAdded(parentCall); mBluetoothInCallService.onCallAdded(activeCall); mBluetoothInCallService.onCallAdded(heldCall); int parentId = parentCall.getId(); Integer parentId = parentCall.getId(); when(activeCall.getParentId()).thenReturn(parentId); when(heldCall.getParentId()).thenReturn(parentId); Loading Loading @@ -1168,7 +1168,7 @@ public class BluetoothInCallServiceTest { private BluetoothCall getMockCall() { BluetoothCall call = mock(com.android.bluetooth.telephony.BluetoothCall.class); int uuid = UUID.randomUUID().hashCode(); Integer uuid = UUID.randomUUID().hashCode(); when(call.getId()).thenReturn(uuid); return call; } Loading Loading
android/app/src/com/android/bluetooth/telephony/BluetoothCall.java +2 −2 Original line number Diff line number Diff line Loading @@ -226,7 +226,7 @@ public class BluetoothCall { mCall.removeListener(listener); } public int getGenericConferenceActiveChildCallId() { public Integer getGenericConferenceActiveChildCallId() { return System.identityHashCode(mCall.getGenericConferenceActiveChildCall()); } Loading Loading @@ -284,7 +284,7 @@ public class BluetoothCall { return getDetails().hasProperty(Call.Details.PROPERTY_IS_EXTERNAL_CALL); } public int getId() { public Integer getId() { return System.identityHashCode(mCall); } Loading
android/app/src/com/android/bluetooth/telephony/BluetoothInCallService.java +3 −3 Original line number Diff line number Diff line Loading @@ -832,7 +832,7 @@ public class BluetoothInCallService extends InCallService { numHeldCalls = 1; // Merge is available, so expose via numHeldCalls. } for (int id : activeCall.getChildrenIds()) { for (Integer id : activeCall.getChildrenIds()) { // Held BluetoothCall has changed due to it being combined into a CDMA conference. // Keep track of this and ignore any future update since it doesn't really count // as a BluetoothCall change. Loading Loading @@ -978,7 +978,7 @@ public class BluetoothInCallService extends InCallService { } @VisibleForTesting public BluetoothCall getBluetoothCallById(int id) { public BluetoothCall getBluetoothCallById(Integer id) { if (mBluetoothCallHashMap.containsKey(id)) { return mBluetoothCallHashMap.get(id); } Loading @@ -988,7 +988,7 @@ public class BluetoothInCallService extends InCallService { @VisibleForTesting public List<BluetoothCall> getBluetoothCallsByIds(List<Integer> ids) { List<BluetoothCall> calls = new ArrayList<>(); for (int id : ids) { for (Integer id : ids) { BluetoothCall call = getBluetoothCallById(id); if (!mCallInfo.isNullCall(call)) { calls.add(call); Loading
android/app/tests/unit/src/com/android/bluetooth/telephony/BluetoothInCallServiceTest.java +8 −8 Original line number Diff line number Diff line Loading @@ -307,7 +307,7 @@ public class BluetoothInCallServiceTest { addCallCapability(parentCall, Connection.CAPABILITY_MERGE_CONFERENCE); addCallCapability(parentCall, Connection.CAPABILITY_SWAP_CONFERENCE); removeCallCapability(parentCall, Connection.CAPABILITY_CONFERENCE_HAS_NO_CHILDREN); int confCall1Id = confCall1.getId(); Integer confCall1Id = confCall1.getId(); when(parentCall.getGenericConferenceActiveChildCallId()) .thenReturn(confCall1Id); when(parentCall.isConference()).thenReturn(true); Loading @@ -315,7 +315,7 @@ public class BluetoothInCallServiceTest { confCall2.getId()); when(parentCall.getChildrenIds()).thenReturn(childrenIds); //Add links from child calls to parent int parentId = parentCall.getId(); Integer parentId = parentCall.getId(); when(confCall1.getParentId()).thenReturn(parentId); when(confCall2.getParentId()).thenReturn(parentId); Loading Loading @@ -369,14 +369,14 @@ public class BluetoothInCallServiceTest { addCallCapability(parentCall, Connection.CAPABILITY_SWAP_CONFERENCE); removeCallCapability(parentCall, Connection.CAPABILITY_CONFERENCE_HAS_NO_CHILDREN); int foregroundCallId = foregroundCall.getId(); Integer foregroundCallId = foregroundCall.getId(); when(parentCall.getGenericConferenceActiveChildCallId()).thenReturn(foregroundCallId); when(parentCall.isConference()).thenReturn(true); List<Integer> childrenIds = Arrays.asList(foregroundCall.getId(), heldCall.getId()); when(parentCall.getChildrenIds()).thenReturn(childrenIds); //Add links from child calls to parent int parentId = parentCall.getId(); Integer parentId = parentCall.getId(); when(foregroundCall.getParentId()).thenReturn(parentId); when(heldCall.getParentId()).thenReturn(parentId); Loading Loading @@ -422,7 +422,7 @@ public class BluetoothInCallServiceTest { confCall2.getId()); when(parentCall.getChildrenIds()).thenReturn(childrenIds); //Add links from child calls to parent int parentId = parentCall.getId(); Integer parentId = parentCall.getId(); when(confCall1.getParentId()).thenReturn(parentId); when(confCall2.getParentId()).thenReturn(parentId); Loading Loading @@ -634,7 +634,7 @@ public class BluetoothInCallServiceTest { mBluetoothInCallService.onCallAdded(childCall2); addCallCapability(parentCall, Connection.CAPABILITY_MANAGE_CONFERENCE); int parentId = parentCall.getId(); Integer parentId = parentCall.getId(); when(childCall1.getParentId()).thenReturn(parentId); when(childCall2.getParentId()).thenReturn(parentId); Loading Loading @@ -1038,7 +1038,7 @@ public class BluetoothInCallServiceTest { mBluetoothInCallService.onCallAdded(parentCall); mBluetoothInCallService.onCallAdded(activeCall); mBluetoothInCallService.onCallAdded(heldCall); int parentId = parentCall.getId(); Integer parentId = parentCall.getId(); when(activeCall.getParentId()).thenReturn(parentId); when(heldCall.getParentId()).thenReturn(parentId); Loading Loading @@ -1168,7 +1168,7 @@ public class BluetoothInCallServiceTest { private BluetoothCall getMockCall() { BluetoothCall call = mock(com.android.bluetooth.telephony.BluetoothCall.class); int uuid = UUID.randomUUID().hashCode(); Integer uuid = UUID.randomUUID().hashCode(); when(call.getId()).thenReturn(uuid); return call; } Loading