diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2014-04-22 06:09:55 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-04-22 06:09:55 -0700 |
commit | 7a9600d724cae4de41472757e0bc8197d9f7f131 (patch) | |
tree | 62509529675e3127a01cd1aa91b21f16de810872 | |
parent | 16d569fccfa325f68b49a99d3256858e81d29b1a (diff) | |
parent | e2d958d0d9221279d2287583acf15c073a476db2 (diff) | |
download | packages_apps_InCallUI-7a9600d724cae4de41472757e0bc8197d9f7f131.tar.gz packages_apps_InCallUI-7a9600d724cae4de41472757e0bc8197d9f7f131.tar.bz2 packages_apps_InCallUI-7a9600d724cae4de41472757e0bc8197d9f7f131.zip |
Merge "IMS-VT: Don't cache SurfaceTexture of camera preview"
-rw-r--r-- | src/com/android/incallui/VideoCallPanel.java | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/com/android/incallui/VideoCallPanel.java b/src/com/android/incallui/VideoCallPanel.java index d085b76a..f0b8816c 100644 --- a/src/com/android/incallui/VideoCallPanel.java +++ b/src/com/android/incallui/VideoCallPanel.java @@ -386,14 +386,7 @@ public class VideoCallPanel extends RelativeLayout implements TextureView.Surfac if (surface.equals(mCameraPreview.getSurfaceTexture())) { if (DBG) log("Camera surface texture created"); - // Use cached surface texture. - if (mCameraSurface==null) { - log("Caching camera surface texture."); - mCameraSurface = surface; - } else { - log("Resetting camera surface texture"); - mCameraPreview.setSurfaceTexture(mCameraSurface); - } + mCameraSurface = surface; // Initialize Camera as needed. if (isCameraInitNeeded()) { @@ -421,7 +414,8 @@ public class VideoCallPanel extends RelativeLayout implements TextureView.Surfac if (DBG) log("CameraPreview surface texture destroyed"); stopRecordingAndPreview(); closeCamera(); - return false; + mCameraSurface = null; + return true; } else if (surface.equals(mFarEndView.getSurfaceTexture())) { if (DBG) log("FarEndView surface texture destroyed"); return false; @@ -683,9 +677,6 @@ public class VideoCallPanel extends RelativeLayout implements TextureView.Surfac } private void releaseCachedSurfaces() { - release(mCameraSurface); - mCameraSurface = null; - release(mFarEndSurface); mFarEndSurface = null; mVideoCallManager.setFarEndSurface(mFarEndSurface); |