summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorMatthieu Baglin <matthieu.baglin@intel.com>2014-12-12 16:27:21 +0100
committerYorke Lee <yorkelee@google.com>2015-03-09 12:51:02 -0700
commit7583ceb3b9f99f9af68d44f83daeb6dfbfc45811 (patch)
treea6bb42fb753125ea16c0a744094fb84624f59ec6 /InCallUI
parent8cdac35f2aa80d1732dfc5fdaee1a21035a1bfcb (diff)
Set the camera to null when preview surface is destroyed
When the video call is disconnected, the camera would still be opened without this fix. Signed-off-by: Matthieu Baglin <matthieu.baglin@intel.com> Change-Id: Ie69fb87412c53e4c6072d998d3e3b067c4c8ba0f
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/VideoCallPresenter.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/InCallUI/src/com/android/incallui/VideoCallPresenter.java b/InCallUI/src/com/android/incallui/VideoCallPresenter.java
index ed0024126..c566264c1 100644
--- a/InCallUI/src/com/android/incallui/VideoCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/VideoCallPresenter.java
@@ -256,6 +256,8 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
mVideoCall.setDisplaySurface(null);
} else if (surface == VideoCallFragment.SURFACE_PREVIEW) {
mVideoCall.setPreviewSurface(null);
+ // Also disable camera as preview is closed
+ mVideoCall.setCamera(null);
}
}