summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CaptureModule.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
-rwxr-xr-x[-rw-r--r--]src/com/android/camera/CaptureModule.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 629f95200..5bb255768 100644..100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -475,6 +475,8 @@ public class CaptureModule implements CameraModule, PhotoController,
private ParcelFileDescriptor mVideoFileDescriptor;
private Uri mSaveUri;
private boolean mQuickCapture;
+ private boolean mUseFrontCamera;
+ private int mTimer;
private byte[] mJpegImageData;
private boolean mSaveRaw = false;
private boolean mSupportZoomCapture = true;
@@ -1214,6 +1216,7 @@ public class CaptureModule implements CameraModule, PhotoController,
}
public boolean isBackCamera() {
+ if (mUseFrontCamera)return false;
String switchValue = mSettingsManager.getValue(SettingsManager.KEY_SWITCH_CAMERA);
if (switchValue != null && !switchValue.equals("-1") ) {
CharSequence[] value = mSettingsManager.getEntryValues(SettingsManager.KEY_SWITCH_CAMERA);
@@ -1871,6 +1874,9 @@ public class CaptureModule implements CameraModule, PhotoController,
if (myExtras != null) {
mSaveUri = (Uri) myExtras.getParcelable(MediaStore.EXTRA_OUTPUT);
mCropValue = myExtras.getString("crop");
+ mUseFrontCamera = myExtras.getBoolean("android.intent.extra.USE_FRONT_CAMERA", false);
+ mTimer = myExtras.getInt("android.intent.extra.TIMER_DURATION_SECONDS", 0);
+ Log.d(TAG, "mUseFrontCamera :" + mUseFrontCamera + ", mTimer :" + mTimer);
}
}
@@ -5704,6 +5710,7 @@ public class CaptureModule implements CameraModule, PhotoController,
String timer = mSettingsManager.getValue(SettingsManager.KEY_TIMER);
int seconds = Integer.parseInt(timer);
+ if (mTimer > 0) seconds = mTimer;
// When shutter button is pressed, check whether the previous countdown is
// finished. If not, cancel the previous countdown and start a new one.
if (mUI.isCountingDown()) {