Fix crash when making emergency calls
When making an emergency call the fallback connection
manager would crash. The problem was that the connection
manager would get a setVideoProvider() call even though
it wasn't routing calls.
The root cause of this crash is b/19185063. As a short term
work around I'm adding a null check to avoid the crash.
BUG: 19020123
Change-Id: Ibe4a791882c9b5e21ae629a63f8d89cd3deba828
diff --git a/telecomm/java/android/telecom/RemoteConnectionService.java b/telecomm/java/android/telecom/RemoteConnectionService.java
index 073dcd5..43a92cb 100644
--- a/telecomm/java/android/telecom/RemoteConnectionService.java
+++ b/telecomm/java/android/telecom/RemoteConnectionService.java
@@ -235,8 +235,12 @@
@Override
public void setVideoProvider(String callId, IVideoProvider videoProvider) {
+ RemoteConnection.VideoProvider remoteVideoProvider = null;
+ if (videoProvider != null) {
+ remoteVideoProvider = new RemoteConnection.VideoProvider(videoProvider);
+ }
findConnectionForAction(callId, "setVideoProvider")
- .setVideoProvider(new RemoteConnection.VideoProvider(videoProvider));
+ .setVideoProvider(remoteVideoProvider);
}
@Override