diff options
author | Jay Wang <jaywang@codeaurora.org> | 2016-03-24 16:14:15 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-04-11 16:24:36 -0700 |
commit | 4b33265c83966f70d4ef5cbe5c182d7dc670e5ee (patch) | |
tree | 5c6d800bf6cd806dc09c23e980de18bc4e7bc8ab /src/com/android/camera/PhotoUI.java | |
parent | d2d5304399167d790ae3e400c1815253e26d917f (diff) | |
download | android_packages_apps_Snap-4b33265c83966f70d4ef5cbe5c182d7dc670e5ee.tar.gz android_packages_apps_Snap-4b33265c83966f70d4ef5cbe5c182d7dc670e5ee.tar.bz2 android_packages_apps_Snap-4b33265c83966f70d4ef5cbe5c182d7dc670e5ee.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.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java index 02d8f7183..06f5604ba 100644 --- a/src/com/android/camera/PhotoUI.java +++ b/src/com/android/camera/PhotoUI.java @@ -1181,6 +1181,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() { |