diff options
author | Michael Bestas <mikeioannina@gmail.com> | 2014-01-20 20:40:32 +0200 |
---|---|---|
committer | Michael Bestas <mikeioannina@gmail.com> | 2015-09-17 23:26:02 +0300 |
commit | 69fe66517f086a01b6f9fb80e669256ec11c6625 (patch) | |
tree | f2645455775f1fe11616071ae9771ab418832247 /src/com/android/camera/VideoModule.java | |
parent | 090a890049355881cba3ed6d503aebafae056384 (diff) | |
download | android_packages_apps_Snap-69fe66517f086a01b6f9fb80e669256ec11c6625.tar.gz android_packages_apps_Snap-69fe66517f086a01b6f9fb80e669256ec11c6625.tar.bz2 android_packages_apps_Snap-69fe66517f086a01b6f9fb80e669256ec11c6625.zip |
Camera: Powerkey shutter (2/2)
Ported from cm-10.1
Including cm-10.1 camera commit:
aa4ae80a41fbab763891c5ef6d67a9e5b4bb981b Don't mess around with pref local ID for power shutter initialization.
Includes http://review.cyanogenmod.org/56986
[mikeioannina]: Updates for L
Signed-off-by: Michael Bestas <mikeioannina@gmail.com>
Change-Id: I0992baa558eefd306d00fbece59cb5c512d9448b
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 ee06289f2..bdf656da6 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. @@ -439,6 +440,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. @@ -1236,6 +1240,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; } @@ -2503,6 +2512,7 @@ public class VideoModule implements CameraModule, Storage.setSaveSDCard( mPreferences.getString(CameraSettings.KEY_CAMERA_SAVEPATH, "0").equals("1")); mActivity.updateStorageSpaceAndHint(); + mActivity.initPowerShutter(mPreferences); } } |