summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/PhotoUI.java
diff options
context:
space:
mode:
authorJay Wang <jaywang@codeaurora.org>2016-03-24 16:14:15 -0700
committerSteve Kondik <steve@cyngn.com>2016-08-03 15:45:46 -0700
commit72a66ba511689265868439282361a353fa348fe5 (patch)
treee52227e63e1a5f6e62bd0355bcd5189ff9f1c788 /src/com/android/camera/PhotoUI.java
parent4180e3b9dd5c8ae712d9dd791f5f69205cefcbeb (diff)
downloadandroid_packages_apps_Snap-72a66ba511689265868439282361a353fa348fe5.tar.gz
android_packages_apps_Snap-72a66ba511689265868439282361a353fa348fe5.tar.bz2
android_packages_apps_Snap-72a66ba511689265868439282361a353fa348fe5.zip
SnapdragonCamera: hide the preview surface during suspend
Occasionally, the previous preview frame is presented and caused the screen flashing, when continuously triggering suspend/resume. To resolve the issue, hide the preview surface during suspend and make it visible during resume. This helps to clear the remaining preview frames in the buffer. CRs-Fixed: 991416 Change-Id: I96fff0fdae6bd14263f33b1a9032604596cf49c1
Diffstat (limited to 'src/com/android/camera/PhotoUI.java')
-rw-r--r--src/com/android/camera/PhotoUI.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index c3bdfa6c4..dd2055527 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -1089,6 +1089,13 @@ public class PhotoUI implements PieListener,
return mSurfaceHolder;
}
+ public void hideSurfaceView() {
+ mSurfaceView.setVisibility(View.INVISIBLE);
+ }
+
+ public void showSurfaceView() {
+ mSurfaceView.setVisibility(View.VISIBLE);
+ }
// Countdown timer
private void initializeCountDown() {