summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/camera/PhotoModule.java5
-rw-r--r--src/com/android/camera/VideoModule.java6
-rw-r--r--src/com/android/camera/WideAnglePanoramaModule.java5
3 files changed, 16 insertions, 0 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 8865d54..8d919b4 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -2481,6 +2481,7 @@ public class PhotoModule
}
switch (keyCode) {
case KeyEvent.KEYCODE_VOLUME_UP:
+ case KeyEvent.KEYCODE_MEDIA_NEXT:
if (mFirstTimeInitialized && (mUI.mMenuInitialized)) {
if (!CameraActivity.mPowerShutter && !CameraUtil.hasCameraKey()) {
onShutterButtonFocus(true);
@@ -2490,6 +2491,7 @@ public class PhotoModule
}
return true;
case KeyEvent.KEYCODE_VOLUME_DOWN:
+ case KeyEvent.KEYCODE_MEDIA_PREVIOUS:
if (mFirstTimeInitialized && (mUI.mMenuInitialized)) {
if (!CameraActivity.mPowerShutter && !CameraUtil.hasCameraKey()) {
onShutterButtonFocus(true);
@@ -2507,6 +2509,7 @@ public class PhotoModule
}
return false;
case KeyEvent.KEYCODE_CAMERA:
+ case KeyEvent.KEYCODE_HEADSETHOOK:
if (mFirstTimeInitialized && event.getRepeatCount() == 0) {
onShutterButtonClick();
}
@@ -2537,6 +2540,8 @@ public class PhotoModule
switch (keyCode) {
case KeyEvent.KEYCODE_VOLUME_UP:
case KeyEvent.KEYCODE_VOLUME_DOWN:
+ case KeyEvent.KEYCODE_MEDIA_NEXT:
+ case KeyEvent.KEYCODE_MEDIA_PREVIOUS:
if (!CameraActivity.mPowerShutter && !CameraUtil.hasCameraKey()
&& mFirstTimeInitialized) {
onShutterButtonClick();
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index e6bf16d..038d0d6 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -1207,6 +1207,7 @@ public class VideoModule implements CameraModule,
switch (keyCode) {
case KeyEvent.KEYCODE_VOLUME_UP:
+ case KeyEvent.KEYCODE_MEDIA_NEXT:
if (event.getRepeatCount() == 0 && !CameraActivity.mPowerShutter &&
!CameraUtil.hasCameraKey()) {
mUI.clickShutter();
@@ -1215,6 +1216,7 @@ public class VideoModule implements CameraModule,
}
return true;
case KeyEvent.KEYCODE_VOLUME_DOWN:
+ case KeyEvent.KEYCODE_MEDIA_PREVIOUS:
if (event.getRepeatCount() == 0 && !CameraActivity.mPowerShutter &&
!CameraUtil.hasCameraKey()) {
mUI.clickShutter();
@@ -1223,6 +1225,7 @@ public class VideoModule implements CameraModule,
}
return true;
case KeyEvent.KEYCODE_CAMERA:
+ case KeyEvent.KEYCODE_HEADSETHOOK:
if (event.getRepeatCount() == 0) {
mUI.clickShutter();
}
@@ -1251,16 +1254,19 @@ public class VideoModule implements CameraModule,
public boolean onKeyUp(int keyCode, KeyEvent event) {
switch (keyCode) {
case KeyEvent.KEYCODE_VOLUME_UP:
+ case KeyEvent.KEYCODE_MEDIA_NEXT:
if (!CameraActivity.mPowerShutter && !CameraUtil.hasCameraKey()) {
mUI.pressShutter(false);
}
return true;
case KeyEvent.KEYCODE_VOLUME_DOWN:
+ case KeyEvent.KEYCODE_MEDIA_PREVIOUS:
if (!CameraActivity.mPowerShutter && !CameraUtil.hasCameraKey()) {
mUI.pressShutter(false);
}
return true;
case KeyEvent.KEYCODE_CAMERA:
+ case KeyEvent.KEYCODE_HEADSETHOOK:
mUI.pressShutter(false);
return true;
case KeyEvent.KEYCODE_POWER:
diff --git a/src/com/android/camera/WideAnglePanoramaModule.java b/src/com/android/camera/WideAnglePanoramaModule.java
index e9090b7..0b2880c 100644
--- a/src/com/android/camera/WideAnglePanoramaModule.java
+++ b/src/com/android/camera/WideAnglePanoramaModule.java
@@ -1184,8 +1184,11 @@ public class WideAnglePanoramaModule
switch (keyCode) {
case KeyEvent.KEYCODE_VOLUME_UP:
case KeyEvent.KEYCODE_VOLUME_DOWN:
+ case KeyEvent.KEYCODE_MEDIA_NEXT:
+ case KeyEvent.KEYCODE_MEDIA_PREVIOUS:
return true;
case KeyEvent.KEYCODE_CAMERA:
+ case KeyEvent.KEYCODE_HEADSETHOOK:
if (event.getRepeatCount() == 0) {
onShutterButtonClick();
}
@@ -1201,6 +1204,8 @@ public class WideAnglePanoramaModule
switch (keyCode) {
case KeyEvent.KEYCODE_VOLUME_UP:
case KeyEvent.KEYCODE_VOLUME_DOWN:
+ case KeyEvent.KEYCODE_MEDIA_NEXT:
+ case KeyEvent.KEYCODE_MEDIA_PREVIOUS:
if (!CameraActivity.mPowerShutter && !CameraUtil.hasCameraKey()) {
onShutterButtonClick();
}