From 000d38ab3ce46ad9ba4d99694c4d1bf46dff9cbf Mon Sep 17 00:00:00 2001 From: Sailesh Nepal Date: Sun, 21 Jun 2015 10:25:13 -0700 Subject: [PATCH] Fix crash when doing conferencing over Wi-Fi The problem was that we were calling Connection.getAudioState in the conferencing code. This led to a null pointer exception. Fix was to add a null pointer check. BUG: 21957102 Change-Id: Ibad0f6cc70a5bc4a30023beb857125802bc35cd4 --- telecomm/java/android/telecom/Connection.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index 91566f8a3a210..6055211a600ab 100644 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -1067,6 +1067,9 @@ public abstract class Connection extends Conferenceable { @SystemApi @Deprecated public final AudioState getAudioState() { + if (mCallAudioState == null) { + return null; + } return new AudioState(mCallAudioState); }