diff options
author | Tyler Gunn <tgunn@google.com> | 2016-04-07 17:25:30 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-04-07 17:25:30 +0000 |
commit | 93761a2d2729625380db4b9a7fe8334ff96b654c (patch) | |
tree | d2b00d83b346b110fe076ab6ba02eaec79d45edb /InCallUI/src | |
parent | fae70b9521bfc61ef06afc6eb787987d26acbdad (diff) | |
parent | d75990c1c893caf86cc09a2ccf6d0c3937401194 (diff) |
Merge "IMS-VT: Fix race-condition causing preview freeze." into nyc-dev am: 1f77177
am: d75990c
* commit 'd75990c1c893caf86cc09a2ccf6d0c3937401194':
IMS-VT: Fix race-condition causing preview freeze.
Change-Id: I4162ad954b4d78c365265bded0c720935553368c
Diffstat (limited to 'InCallUI/src')
-rw-r--r-- | InCallUI/src/com/android/incallui/Call.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java index 3973fdfd6..a27efec76 100644 --- a/InCallUI/src/com/android/incallui/Call.java +++ b/InCallUI/src/com/android/incallui/Call.java @@ -376,6 +376,7 @@ public class Call { private int mRequestedVideoState = VideoProfile.STATE_AUDIO_ONLY; private InCallVideoCallCallback mVideoCallCallback; + private boolean mIsVideoCallCallbackRegistered; private String mChildNumber; private String mLastForwardedNumber; private String mCallSubject; @@ -478,6 +479,7 @@ public class Call { mVideoCallCallback = new InCallVideoCallCallback(this); } mTelecomCall.getVideoCall().registerCallback(mVideoCallCallback); + mIsVideoCallCallbackRegistered = true; } mChildCallIds.clear(); @@ -784,8 +786,14 @@ public class Call { return mTelecomCall == null ? null : mTelecomCall.getDetails().getAccountHandle(); } + /** + * @return The {@link VideoCall} instance associated with the {@link android.telecom.Call}. + * Will return {@code null} until {@link #updateFromTelecomCall()} has registered a valid + * callback on the {@link VideoCall}. + */ public VideoCall getVideoCall() { - return mTelecomCall == null ? null : mTelecomCall.getVideoCall(); + return mTelecomCall == null || !mIsVideoCallCallbackRegistered ? null + : mTelecomCall.getVideoCall(); } public List<String> getChildCallIds() { |