IMS-VT: CameraCapabilities are not passed to UI.
Sometimes, during conference merge scenario, callbacks for VideoCall
might get unregistered while enabling camera. This prevents camera
capabilities from propagated to InCallUI and thereby prevents startng
of camera preview.
After conference merge videoCall is changed and we started using
the new videoCall before its callback is registered
To fix this storing previous videoCall and comparing with latest
videoCall.
Change-Id: Iaccf0a6f2d5e918f3e8d3b5652084d813d1ace66
CRs-fixed: 1020168
diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java
index feaf5ee..c8906ed 100644
--- a/InCallUI/src/com/android/incallui/Call.java
+++ b/InCallUI/src/com/android/incallui/Call.java
@@ -395,7 +395,7 @@
private int mRequestedVideoState = VideoProfile.STATE_AUDIO_ONLY;
private InCallVideoCallCallback mVideoCallCallback;
- private boolean mIsVideoCallCallbackRegistered;
+ private VideoCall mRegisteredVideoCall;
private String mChildNumber;
private String mLastForwardedNumber;
private String mCallSubject;
@@ -489,7 +489,7 @@
mVideoCallCallback = new InCallVideoCallCallback(this);
}
mTelecomCall.getVideoCall().registerCallback(mVideoCallCallback);
- mIsVideoCallCallbackRegistered = true;
+ mRegisteredVideoCall = mTelecomCall.getVideoCall();
}
mChildCallIds.clear();
@@ -845,7 +845,7 @@
* callback on the {@link VideoCall}.
*/
public VideoCall getVideoCall() {
- return mTelecomCall == null || !mIsVideoCallCallbackRegistered ? null
+ return mTelecomCall == null || (mRegisteredVideoCall != mTelecomCall.getVideoCall()) ? null
: mTelecomCall.getVideoCall();
}