<item>fireworks</item>
</string-array>
+ <string-array name="pref_camera_quickcapture_entries" translatable="false">
+ <item>@string/pref_camera_quickcapture_entry_off</item>
+ <item>@string/pref_camera_quickcapture_entry_on</item>
+ </string-array>
+
+ <string-array name="pref_camera_quickcapture_entryvalues" translatable="false">
+ <item>off</item>
+ <item>on</item>
+ </string-array>
+
<string-array name="scenemode_modes" translatable="false">
<item>off</item>
<item>on</item>
<!-- Scene mode optimized for taking images of fireworks. -->
<string name="pref_camera_scenemode_entry_fireworks">Fireworks</string>
+ <!-- Settings menu, enable quick capture mode or not -->
+ <string name="pref_camera_quickcapture_title">Quick Capture</string>
+ <string name="pref_camera_quickcapture_default" translatable="false">off</string>
+ <string name="pref_camera_quickcapture_entry_on">On</string>
+ <string name="pref_camera_quickcapture_entry_off">Off</string>
+
<!-- Restore settings item in preference -->
<string name="pref_restore_title">Restore settings</string>
<string name="pref_restore_detail">Restore camera settings to default</string>
camera:icons="@array/pref_camera_focusmode_icons"
camera:entries="@array/pref_camera_focusmode_entries"
camera:entryValues="@array/pref_camera_focusmode_entryvalues" />
+ <ListPreference
+ camera:key="pref_camera_quickcapture_key"
+ camera:defaultValue="@string/pref_camera_quickcapture_default"
+ camera:title="@string/pref_camera_quickcapture_title"
+ camera:entries="@array/pref_camera_quickcapture_entries"
+ camera:entryValues="@array/pref_camera_quickcapture_entryvalues" />
</PreferenceGroup>
</PreferenceGroup>
private final Handler mHandler = new MainHandler();
private OnScreenSettings mSettings;
+ private boolean mQuickCapture;
/**
* This Handler is used to post message back onto the main thread of the
// We want to show the taken picture for a while, so we wait
// for at least 1.2 second before restarting the preview.
long delay = 1200 - mPictureDisplayedToJpegCallbackTime;
- if (delay < 0) {
+ if (delay < 0 || mQuickCapture) {
restartPreview();
} else {
mHandler.sendEmptyMessageDelayed(RESTART_PREVIEW, delay);
mPreferences = PreferenceManager.getDefaultSharedPreferences(this);
CameraSettings.upgradePreferences(mPreferences);
+ mQuickCapture = getQuickCaptureSettings();
/*
* To reduce startup time, we start the preview in another thread.
} else {
stopReceivingLocationUpdates();
}
+ } else if (CameraSettings.KEY_QUICK_CAPTURE.equals(key)) {
+ mQuickCapture = getQuickCaptureSettings();
} else {
// All preferences except RECORD_LOCATION are camera parameters.
// Call setCameraParameters to take effect now.
}
}
+ private boolean getQuickCaptureSettings() {
+ String value = mPreferences.getString(
+ CameraSettings.KEY_QUICK_CAPTURE,
+ getString(R.string.pref_camera_quickcapture_default));
+ return CameraSettings.QUICK_CAPTURE_ON.equals(value);
+ }
+
@Override
public void onUserInteraction() {
super.onUserInteraction();
public static final String KEY_WHITE_BALANCE =
"pref_camera_whitebalance_key";
public static final String KEY_SCENE_MODE = "pref_camera_scenemode_key";
+ public static final String KEY_QUICK_CAPTURE =
+ "pref_camera_quickcapture_key";
+
+ public static final String QUICK_CAPTURE_ON = "on";
+ public static final String QUICK_CAPTURE_OFF = "off";
public static final int CURRENT_VERSION = 3;