diff options
author | Sascha Haeberling <haeberling@google.com> | 2013-10-10 22:30:59 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-10-10 22:31:01 +0000 |
commit | ada31cbe4010e192825b7eb9b7093d4d75cf3558 (patch) | |
tree | cd293dfdf9c5000100ca25390f0eb62004610b09 /src/com/android/camera | |
parent | 23df6752f1bf0cc7d13b3aa68e87a8dde36af2d4 (diff) | |
parent | 4ec139dc81482ebfef1e62a3987c53bd5880c759 (diff) | |
download | android_packages_apps_Snap-ada31cbe4010e192825b7eb9b7093d4d75cf3558.tar.gz android_packages_apps_Snap-ada31cbe4010e192825b7eb9b7093d4d75cf3558.tar.bz2 android_packages_apps_Snap-ada31cbe4010e192825b7eb9b7093d4d75cf3558.zip |
Merge "Hide the status bar and switch into lights-out mode when popup is dimissed." into gb-ub-photos-carlsbad
Diffstat (limited to 'src/com/android/camera')
-rw-r--r-- | src/com/android/camera/CameraActivity.java | 15 | ||||
-rw-r--r-- | src/com/android/camera/PhotoUI.java | 4 | ||||
-rw-r--r-- | src/com/android/camera/VideoUI.java | 4 |
3 files changed, 19 insertions, 4 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java index 282c2fe21..0181fec93 100644 --- a/src/com/android/camera/CameraActivity.java +++ b/src/com/android/camera/CameraActivity.java @@ -419,7 +419,7 @@ public class CameraActivity extends Activity * to lights-out mode. */ - private void setSystemBarsVisibility(boolean visible) { + public void setSystemBarsVisibility(boolean visible) { setSystemBarsVisibility(visible, false); } @@ -432,10 +432,17 @@ public class CameraActivity extends Activity mMainHandler.removeMessages(HIDE_ACTION_BAR); boolean currentlyVisible = mActionBar.isShowing(); + // We need to set these flags independently of the action bar + // visibility, as the system can change the system UI visibility + // independently. + // Note: setSystemUiVisibitliy will be a no-op if the flag passed in is + // the same as the current one, so it's OK to call this often. Adding an + // additional check here is therefore unnecessary. + int visibility = DEFAULT_SYSTEM_UI_VISIBILITY | (visible ? View.SYSTEM_UI_FLAG_VISIBLE + : View.SYSTEM_UI_FLAG_LOW_PROFILE | View.SYSTEM_UI_FLAG_FULLSCREEN); + mAboveFilmstripControlLayout.setSystemUiVisibility(visibility); + if (visible != currentlyVisible) { - int visibility = DEFAULT_SYSTEM_UI_VISIBILITY | (visible ? View.SYSTEM_UI_FLAG_VISIBLE - : View.SYSTEM_UI_FLAG_LOW_PROFILE | View.SYSTEM_UI_FLAG_FULLSCREEN); - mAboveFilmstripControlLayout.setSystemUiVisibility(visibility); if (visible) { mActionBar.show(); } else { diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java index 58751efbf..f3603c050 100644 --- a/src/com/android/camera/PhotoUI.java +++ b/src/com/android/camera/PhotoUI.java @@ -573,6 +573,10 @@ public class PhotoUI implements PieListener, mPopup = null; mMenu.popupDismissed(); showUI(); + + // Switch back into fullscreen/lights-out mode after popup + // is dimissed. + mActivity.setSystemBarsVisibility(false); } }); } diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java index 7080032f4..bdfdc0dd3 100644 --- a/src/com/android/camera/VideoUI.java +++ b/src/com/android/camera/VideoUI.java @@ -150,6 +150,10 @@ public class VideoUI implements PieRenderer.PieListener, popupDismissed(); showUI(); mVideoMenu.popupDismissed(topLevelOnly); + + // Switch back into fullscreen/lights-out mode after popup + // is dimissed. + mActivity.setSystemBarsVisibility(false); } @Override |