summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorweijiew <weijiew@codeaurora.org>2016-11-14 15:27:36 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-11-17 19:23:52 -0800
commit27ebaef9c1210ee068c44585c4d6fb648d7e3d7d (patch)
tree5c24bc7acf74368d55c745618f8d40937d46c2c4 /src
parent99531a0cef9b846134802940de64174696703778 (diff)
downloadandroid_packages_apps_Snap-27ebaef9c1210ee068c44585c4d6fb648d7e3d7d.tar.gz
android_packages_apps_Snap-27ebaef9c1210ee068c44585c4d6fb648d7e3d7d.tar.bz2
android_packages_apps_Snap-27ebaef9c1210ee068c44585c4d6fb648d7e3d7d.zip
SnapdragonCamera: Shutter button was disabled after switching to video mode
Video mode was not supported when triggering continue shot, when continue shot was triggered, video button was not disabled and led to shutter button can't restore to enable. Solution: Disable video button when triggering continue shot;disable continue shot when recording video Change-Id: If30323e6a3f9b39ce6c5f3a8c74d78ac7526c382 CRs-Fixed: 1085338
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/CaptureModule.java14
-rw-r--r--src/com/android/camera/CaptureUI.java9
2 files changed, 22 insertions, 1 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 42f94b6f5..05407d01a 100644
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -1299,6 +1299,13 @@ public class CaptureModule implements CameraModule, PhotoController,
unlockFocus(id);
}
}, mCaptureCallbackHandler);
+ mActivity.runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ mUI.enableVideo(false);
+ }
+ });
+
} else {
checkAndPlayShutterSound(id);
if(isMpoOn()) {
@@ -1555,6 +1562,7 @@ public class CaptureModule implements CameraModule, PhotoController,
public void run() {
mUI.stopSelfieFlash();
mUI.enableShutter(true);
+ mUI.enableVideo(true);
}
});
}
@@ -2067,7 +2075,7 @@ public class CaptureModule implements CameraModule, PhotoController,
}
});
mUI.enableShutter(true);
-
+ mUI.enableVideo(true);
String scene = mSettingsManager.getValue(SettingsManager.KEY_SCENE_MODE);
if(isPanoSetting(scene)) {
mActivity.onModuleSelected(ModuleSwitcher.PANOCAPTURE_MODULE_INDEX);
@@ -3159,6 +3167,10 @@ public class CaptureModule implements CameraModule, PhotoController,
return true;
}
+ if ( mIsRecordingVideo ) {
+ Log.e(TAG, " cancel longshot:not supported when recording");
+ return true;
+ }
return false;
}
diff --git a/src/com/android/camera/CaptureUI.java b/src/com/android/camera/CaptureUI.java
index 88460b865..e73ad32f5 100644
--- a/src/com/android/camera/CaptureUI.java
+++ b/src/com/android/camera/CaptureUI.java
@@ -879,6 +879,15 @@ public class CaptureUI implements FocusOverlayManager.FocusUI,
}
}
+ /**
+ * Enables or disables the video button.
+ */
+ public void enableVideo(boolean enabled) {
+ if (mVideoButton != null) {
+ mVideoButton.setEnabled(enabled);
+ }
+ }
+
private boolean handleBackKeyOnMenu() {
if (mFilterMenuStatus == FILTER_MENU_ON) {
removeFilterMenu(true);