summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/ui
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2012-05-17 16:45:12 -0700
committerChih-Chung Chang <chihchung@google.com>2012-05-17 18:26:20 -0700
commit203af87f102cc8ad1287a838d52f0a70896ab1c8 (patch)
tree4449997be59027f5938958489e5943a41146818c /src/com/android/gallery3d/ui
parent1271b1a831bba981d227ec9968ab5ca1cc95d11c (diff)
downloadandroid_packages_apps_Snap-203af87f102cc8ad1287a838d52f0a70896ab1c8.tar.gz
android_packages_apps_Snap-203af87f102cc8ad1287a838d52f0a70896ab1c8.tar.bz2
android_packages_apps_Snap-203af87f102cc8ad1287a838d52f0a70896ab1c8.zip
Use View.setSystemUiVisibility to enter/leave lights-out mode.
Bug: 6451200 Change-Id: I8e27b3e5eedfa2652f06dfc8f377c9cef8100160
Diffstat (limited to 'src/com/android/gallery3d/ui')
-rw-r--r--src/com/android/gallery3d/ui/GLRoot.java1
-rw-r--r--src/com/android/gallery3d/ui/GLRootView.java6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/ui/GLRoot.java b/src/com/android/gallery3d/ui/GLRoot.java
index f4b7572a7..1651b4361 100644
--- a/src/com/android/gallery3d/ui/GLRoot.java
+++ b/src/com/android/gallery3d/ui/GLRoot.java
@@ -44,4 +44,5 @@ public interface GLRoot {
public Matrix getCompensationMatrix();
public void freeze();
public void unfreeze();
+ public void setLightsOutMode(boolean enabled);
}
diff --git a/src/com/android/gallery3d/ui/GLRootView.java b/src/com/android/gallery3d/ui/GLRootView.java
index 73e982509..987e9a2ae 100644
--- a/src/com/android/gallery3d/ui/GLRootView.java
+++ b/src/com/android/gallery3d/ui/GLRootView.java
@@ -512,6 +512,12 @@ public class GLRootView extends GLSurfaceView
mRenderLock.unlock();
}
+ @Override
+ public void setLightsOutMode(boolean enabled) {
+ int flags = enabled ? SYSTEM_UI_FLAG_LOW_PROFILE : 0;
+ setSystemUiVisibility(flags);
+ }
+
// We need to unfreeze in the following methods and in onPause().
// These methods will wait on GLThread. If we have freezed the GLRootView,
// the GLThread will wait on main thread to call unfreeze and cause dead