diff options
author | Yorke Lee <yorkelee@google.com> | 2015-03-13 17:18:49 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2015-03-13 17:18:49 -0700 |
commit | c276df6878f97e4cc2650aeceedb8795072e35b2 (patch) | |
tree | 5de734e6b74b28118b3b1b5a5e7ca4332ceb38cb | |
parent | 153e86e1905e41e2ebeeccebaaff218d86184c09 (diff) |
Don't crash when rotating during video call
If mTextureView has not changed across recreation, don't
set the texture and listeners.
Change-Id: I704abf6c9a6197d51233567c4ff2bd1e19393a95
-rw-r--r-- | InCallUI/src/com/android/incallui/VideoCallFragment.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/InCallUI/src/com/android/incallui/VideoCallFragment.java b/InCallUI/src/com/android/incallui/VideoCallFragment.java index 0b5bb4b23..349676cf0 100644 --- a/InCallUI/src/com/android/incallui/VideoCallFragment.java +++ b/InCallUI/src/com/android/incallui/VideoCallFragment.java @@ -138,6 +138,10 @@ public class VideoCallFragment extends BaseFragment<VideoCallPresenter, * @param view The {@link TextureView}. */ public void recreateView(TextureView view) { + if (mTextureView == view) { + return; + } + mTextureView = view; mTextureView.setSurfaceTextureListener(this); mTextureView.setOnClickListener(this); |