summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CameraActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/CameraActivity.java')
-rw-r--r--src/com/android/camera/CameraActivity.java15
1 files changed, 11 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 {