summaryrefslogtreecommitdiffstats
path: root/telecomm
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2014-06-30 14:22:57 -0700
committerTyler Gunn <tgunn@google.com>2014-06-30 21:26:05 +0000
commit807de8aa763a5ba459ab87b6e0b61c3a025c1ebe (patch)
treeac1654b993997a5f2d81c665d32a33ad4c880eab /telecomm
parentcef139470df02fbe4e9464a54b8e09f29bc99cd9 (diff)
downloadframeworks_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.java5
-rw-r--r--telecomm/java/android/telecomm/RemoteCallVideoProvider.java4
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
+ }
+}