From 11aeae5e46541ce40fa26c678a50ba80780aee34 Mon Sep 17 00:00:00 2001 From: Sailesh Nepal Date: Wed, 28 Jan 2015 16:54:09 -0800 Subject: [PATCH] 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 --- telecomm/java/android/telecom/RemoteConnectionService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/telecomm/java/android/telecom/RemoteConnectionService.java b/telecomm/java/android/telecom/RemoteConnectionService.java index 073dcd5fbb725..43a92cb576e72 100644 --- a/telecomm/java/android/telecom/RemoteConnectionService.java +++ b/telecomm/java/android/telecom/RemoteConnectionService.java @@ -235,8 +235,12 @@ final class RemoteConnectionService { @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