diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/Camera.java | 2 | ||||
-rw-r--r-- | src/com/android/camera/Util.java | 7 | ||||
-rw-r--r-- | src/com/android/camera/VideoCamera.java | 2 | ||||
-rw-r--r-- | src/com/android/camera/panorama/PanoramaActivity.java | 3 |
4 files changed, 12 insertions, 2 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index e2fd9e89..7d8a986a 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -885,6 +885,8 @@ public class Camera extends ActivityBase implements FocusManager.Listener, }); startPreviewThread.start(); + Util.enterLightsOutMode(getWindow()); + // don't set mSurfaceHolder here. We have it set ONLY within // surfaceChanged / surfaceDestroyed, other parts of the code // assume that when it is set, the surface is also set. diff --git a/src/com/android/camera/Util.java b/src/com/android/camera/Util.java index ca4bb42f..aacf0ec0 100644 --- a/src/com/android/camera/Util.java +++ b/src/com/android/camera/Util.java @@ -42,6 +42,7 @@ import android.view.Display; import android.view.OrientationEventListener; import android.view.Surface; import android.view.View; +import android.view.Window; import android.view.WindowManager; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; @@ -575,4 +576,10 @@ public class Util { } } } + + public static void enterLightsOutMode(Window window) { + WindowManager.LayoutParams params = window.getAttributes(); + params.systemUiVisibility = View.SYSTEM_UI_FLAG_LOW_PROFILE; + window.setAttributes(params); + } } diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java index c4172b72..6b7fd3ba 100644 --- a/src/com/android/camera/VideoCamera.java +++ b/src/com/android/camera/VideoCamera.java @@ -383,6 +383,8 @@ public class VideoCamera extends ActivityBase }); startPreviewThread.start(); + Util.enterLightsOutMode(getWindow()); + mContentResolver = getContentResolver(); requestWindowFeature(Window.FEATURE_PROGRESS); diff --git a/src/com/android/camera/panorama/PanoramaActivity.java b/src/com/android/camera/panorama/PanoramaActivity.java index 73555c48..0c664e13 100644 --- a/src/com/android/camera/panorama/PanoramaActivity.java +++ b/src/com/android/camera/panorama/PanoramaActivity.java @@ -59,8 +59,6 @@ import android.view.Gravity; import android.view.OrientationEventListener; import android.view.View; import android.view.WindowManager; -import android.view.animation.Animation; -import android.view.animation.AnimationUtils; import android.widget.ImageView; import android.widget.TextView; @@ -185,6 +183,7 @@ public class PanoramaActivity extends Activity implements getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); + Util.enterLightsOutMode(getWindow()); createContentView(); |