Added null check and synchronization on multi-party API.
Etan Cohen [Fri, 24 Oct 2014 18:10:58 +0000 (11:10 -0700)]
Change-Id: Ie8ffb647a239b789deeabaf4a0e61418af627f75

src/java/com/android/ims/ImsCall.java

index c927113..3eca8bd 100644 (file)
@@ -470,7 +470,7 @@ public class ImsCall implements ICall {
         }
 
         if (call instanceof ImsCall) {
-            return this.equals((ImsCall)call);
+            return this.equals(call);
         }
 
         return false;
@@ -650,7 +650,13 @@ public class ImsCall implements ICall {
      * @return {@code True} if the call is a multiparty call.
      */
     public boolean isMultiparty() {
-        return mSession.isMultiparty();
+        synchronized(mLockObj) {
+            if (mSession == null) {
+                return false;
+            }
+
+            return mSession.isMultiparty();
+        }
     }
 
     /**