diff options
author | Adrian Roos <roosa@google.com> | 2015-09-03 15:59:49 -0700 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2015-09-09 16:57:14 -0700 |
commit | 5941c98c641e64a26bf68816faf967d25cc8f256 (patch) | |
tree | 52534c852fe9d4a4b6b063a97a93e52a7a4b6a88 /core | |
parent | 1b6f819a649d7c05b22ac420fa6fcf4a634600ba (diff) | |
download | frameworks_base-5941c98c641e64a26bf68816faf967d25cc8f256.zip frameworks_base-5941c98c641e64a26bf68816faf967d25cc8f256.tar.gz frameworks_base-5941c98c641e64a26bf68816faf967d25cc8f256.tar.bz2 |
Add double-tap power button to open camera 1/2
Bug: 23787555
Change-Id: I052b64748f155c59fbb649b32265f559423a8845
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/provider/Settings.java | 9 | ||||
-rw-r--r-- | core/java/com/android/internal/logging/MetricsLogger.java | 2 | ||||
-rwxr-xr-x | core/res/res/values/config.xml | 4 | ||||
-rwxr-xr-x | core/res/res/values/symbols.xml | 1 |
4 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 78be3cd..2053dbe 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -5719,6 +5719,15 @@ public final class Settings { public static final String CAMERA_GESTURE_DISABLED = "camera_gesture_disabled"; /** + * Whether the camera launch gesture to double tap the power button when the screen is off + * should be disabled. + * + * @hide + */ + public static final String CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED = + "camera_double_tap_power_gesture_disabled"; + + /** * This are the settings to be backed up. * * NOTE: Settings are backed up and restored in the order they appear diff --git a/core/java/com/android/internal/logging/MetricsLogger.java b/core/java/com/android/internal/logging/MetricsLogger.java index 6da0f63..b6240e4 100644 --- a/core/java/com/android/internal/logging/MetricsLogger.java +++ b/core/java/com/android/internal/logging/MetricsLogger.java @@ -44,6 +44,8 @@ public class MetricsLogger implements MetricsConstants { public static final int ACTION_FINGERPRINT_AUTH = 252; public static final int ACTION_FINGERPRINT_DELETE = 253; public static final int ACTION_FINGERPRINT_RENAME = 254; + public static final int ACTION_DOUBLE_TAP_POWER_CAMERA_GESTURE = 255; + public static final int ACTION_WIGGLE_CAMERA_GESTURE = 256; public static void visible(Context context, int category) throws IllegalArgumentException { if (Build.IS_DEBUGGABLE && category == VIEW_UNKNOWN) { diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index d7658d1..f711c80 100755 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -2290,4 +2290,8 @@ <!-- The OEM specified sensor string type for the gesture to launch camera app, this value must match the value of config_cameraLaunchGestureSensorType in OEM's HAL --> <string translatable="false" name="config_cameraLaunchGestureSensorStringType"></string> + + <!-- Allow the gesture to double tap the power button twice to start the camera while the device + is non-interactive. --> + <bool name="config_cameraDoubleTapPowerGestureEnabled">true</bool> </resources> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 4c8e55e..0e85f43 100755 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -2323,6 +2323,7 @@ <!-- Gesture --> <java-symbol type="integer" name="config_cameraLaunchGestureSensorType" /> <java-symbol type="string" name="config_cameraLaunchGestureSensorStringType" /> + <java-symbol type="bool" name="config_cameraDoubleTapPowerGestureEnabled" /> <java-symbol type="drawable" name="platlogo_m" /> </resources> |