Update fixes based on the latest source code
bug: 263191685
Test: make oriole-userdebug
Change-Id: I64aa8edb9ebc5edb3d816a7fdbe6d41813201361
diff --git a/src/com/android/server/telecom/InCallController.java b/src/com/android/server/telecom/InCallController.java
index 7a38583..8fb1afa 100644
--- a/src/com/android/server/telecom/InCallController.java
+++ b/src/com/android/server/telecom/InCallController.java
@@ -1383,13 +1383,15 @@
public void onCallEndpointChanged(CallEndpoint callEndpoint) {
if (!mInCallServices.isEmpty()) {
Log.i(this, "Calling onCallEndpointChanged");
- for (IInCallService inCallService : mInCallServices.values()) {
- try {
- inCallService.onCallEndpointChanged(callEndpoint);
- } catch (RemoteException ignored) {
- Log.d(this, "Remote exception calling onCallEndpointChanged");
+ mInCallServices.values().forEach(inCallServices -> {
+ for (IInCallService inCallService : inCallServices.values()) {
+ try {
+ inCallService.onCallEndpointChanged(callEndpoint);
+ } catch (RemoteException ignored) {
+ Log.d(this, "Remote exception calling onCallEndpointChanged");
+ }
}
- }
+ });
}
}
@@ -1398,13 +1400,15 @@
if (!mInCallServices.isEmpty()) {
Log.i(this, "Calling onAvailableCallEndpointsChanged");
List<CallEndpoint> availableEndpoints = new ArrayList<>(availableCallEndpoints);
- for (IInCallService inCallService : mInCallServices.values()) {
- try {
- inCallService.onAvailableCallEndpointsChanged(availableEndpoints);
- } catch (RemoteException ignored) {
- Log.d(this, "Remote exception calling onAvailableCallEndpointsChanged");
+ mInCallServices.values().forEach(inCallServices -> {
+ for (IInCallService inCallService : inCallServices.values()) {
+ try {
+ inCallService.onAvailableCallEndpointsChanged(availableEndpoints);
+ } catch (RemoteException ignored) {
+ Log.d(this, "Remote exception calling onAvailableCallEndpointsChanged");
+ }
}
- }
+ });
}
}
@@ -1412,13 +1416,15 @@
public void onMuteStateChanged(boolean isMuted) {
if (!mInCallServices.isEmpty()) {
Log.i(this, "Calling onMuteStateChanged");
- for (IInCallService inCallService : mInCallServices.values()) {
- try {
- inCallService.onMuteStateChanged(isMuted);
- } catch (RemoteException ignored) {
- Log.d(this, "Remote exception calling onMuteStateChanged");
+ mInCallServices.values().forEach(inCallServices -> {
+ for (IInCallService inCallService : inCallServices.values()) {
+ try {
+ inCallService.onMuteStateChanged(isMuted);
+ } catch (RemoteException ignored) {
+ Log.d(this, "Remote exception calling onMuteStateChanged");
+ }
}
- }
+ });
}
}