diff options
Diffstat (limited to 'src/com/android/camera/VideoModule.java')
-rw-r--r-- | src/com/android/camera/VideoModule.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 7c5a88e6f..a509b8f32 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -1,5 +1,6 @@ /* * Copyright (C) 2012 The Android Open Source Project + * Copyright (C) 2013-2015 The CyanogenMod Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -506,6 +507,9 @@ public class VideoModule implements CameraModule, mOrientationManager = new OrientationManager(mActivity); + // Power shutter + mActivity.initPowerShutter(mPreferences); + /* * To reduce startup time, we start the preview in another thread. * We make sure the preview is started at the end of onCreate. @@ -1415,6 +1419,11 @@ public class VideoModule implements CameraModule, case KeyEvent.KEYCODE_CAMERA: mUI.pressShutter(false); return true; + case KeyEvent.KEYCODE_POWER: + if (CameraActivity.mPowerShutter) { + onShutterButtonClick(); + } + return true; } return false; } @@ -2916,6 +2925,7 @@ public class VideoModule implements CameraModule, Storage.setSaveSDCard( mPreferences.getString(CameraSettings.KEY_CAMERA_SAVEPATH, "0").equals("1")); mActivity.updateStorageSpaceAndHint(); + mActivity.initPowerShutter(mPreferences); } } |