diff options
author | Tyler Gunn <tgunn@google.com> | 2014-06-30 14:22:57 -0700 |
---|---|---|
committer | Tyler Gunn <tgunn@google.com> | 2014-06-30 21:26:05 +0000 |
commit | 807de8aa763a5ba459ab87b6e0b61c3a025c1ebe (patch) | |
tree | ac1654b993997a5f2d81c665d32a33ad4c880eab /telecomm | |
parent | cef139470df02fbe4e9464a54b8e09f29bc99cd9 (diff) | |
download | frameworks_base-807de8aa763a5ba459ab87b6e0b61c3a025c1ebe.zip frameworks_base-807de8aa763a5ba459ab87b6e0b61c3a025c1ebe.tar.gz frameworks_base-807de8aa763a5ba459ab87b6e0b61c3a025c1ebe.tar.bz2 |
Fixing crash in phone app due to missing null checks pertaining to
CallVideoProvider.
Change-Id: Ifd5a558a2b36e0cb656c9a57f64ae0744425a3ef
Diffstat (limited to 'telecomm')
-rw-r--r-- | telecomm/java/android/telecomm/InCallCall.java | 5 | ||||
-rw-r--r-- | telecomm/java/android/telecomm/RemoteCallVideoProvider.java | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/telecomm/java/android/telecomm/InCallCall.java b/telecomm/java/android/telecomm/InCallCall.java index 2a77547..cf31cec 100644 --- a/telecomm/java/android/telecomm/InCallCall.java +++ b/telecomm/java/android/telecomm/InCallCall.java @@ -159,7 +159,7 @@ public final class InCallCall implements Parcelable { * @return The call video provider. */ public RemoteCallVideoProvider getCallVideoProvider() throws RemoteException { - if (mRemoteCallVideoProvider == null) { + if (mRemoteCallVideoProvider == null && mCallVideoProvider != null) { try { mRemoteCallVideoProvider = new RemoteCallVideoProvider(mCallVideoProvider); } catch (RemoteException ignored) { @@ -244,7 +244,8 @@ public final class InCallCall implements Parcelable { destination.writeParcelable(mSubscription, 0); destination.writeParcelable(mCurrentCallServiceDescriptor, 0); destination.writeParcelable(mHandoffCallServiceDescriptor, 0); - destination.writeStrongBinder(mCallVideoProvider.asBinder()); + destination.writeStrongBinder( + mCallVideoProvider != null ? mCallVideoProvider.asBinder() : null); destination.writeString(mParentCallId); destination.writeList(mChildCallIds); } diff --git a/telecomm/java/android/telecomm/RemoteCallVideoProvider.java b/telecomm/java/android/telecomm/RemoteCallVideoProvider.java index 7b86db0..872085a 100644 --- a/telecomm/java/android/telecomm/RemoteCallVideoProvider.java +++ b/telecomm/java/android/telecomm/RemoteCallVideoProvider.java @@ -42,5 +42,5 @@ public class RemoteCallVideoProvider implements IBinder.DeathRecipient { */ public void setCamera(String cameraId) throws RemoteException { mCallVideoProvider.setCamera(cameraId); - }; -}
\ No newline at end of file + } +} |