summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2013-12-07 06:27:51 -0800
committerMichael Bestas <mikeioannina@gmail.com>2015-09-17 23:26:01 +0300
commitffe842eb13dbc9b4da171c5bca11a3b3b2c8083d (patch)
tree88269898f06fff7844f2fe3f17b72b24fdce5bdc
parent09f757a7c83d0e4255828e2a6536656005f284aa (diff)
downloadandroid_packages_apps_Snap-ffe842eb13dbc9b4da171c5bca11a3b3b2c8083d.zip
android_packages_apps_Snap-ffe842eb13dbc9b4da171c5bca11a3b3b2c8083d.tar.gz
android_packages_apps_Snap-ffe842eb13dbc9b4da171c5bca11a3b3b2c8083d.tar.bz2
camera: Remove the luma-adaptation seekbar
* Not useful for any hardware I have encountered. Change-Id: I93cca2b3bf907cc01946a55111de9eb883475d24
-rw-r--r--res/layout/photo_module.xml10
-rw-r--r--src/com/android/camera/PhotoModule.java82
2 files changed, 0 insertions, 92 deletions
diff --git a/res/layout/photo_module.xml b/res/layout/photo_module.xml
index afc6377..105a8c9 100644
--- a/res/layout/photo_module.xml
+++ b/res/layout/photo_module.xml
@@ -44,16 +44,6 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
- <ProgressBar
- style="?android:attr/progressBarStyleHorizontal"
- android:id="@+id/progress"
- android:orientation="vertical"
- android:layout_width="200dip"
- android:layout_height="wrap_content"
- android:layout_marginTop="14dip"
- android:layout_marginBottom="14dip"
- android:layout_marginLeft="30dip"
- android:layout_marginRight="30dip" />
<com.android.camera.GraphView
android:id="@+id/graph_view"
android:layout_width="200dip"
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 2062bce..c7aeac7 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -55,7 +55,6 @@ import android.view.SurfaceHolder;
import android.view.View;
import android.view.WindowManager;
import android.widget.Toast;
-import android.widget.ProgressBar;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.LinearLayout;
@@ -102,8 +101,6 @@ import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.SystemProperties;
-import java.util.Collections;
-import java.util.Formatter;
public class PhotoModule
implements CameraModule,
@@ -118,7 +115,6 @@ public class PhotoModule
private static final String TAG = "CAM_PhotoModule";
//QCom data members
- public static boolean mBrightnessVisible = false;
private static final int MAX_SHARPNESS_LEVEL = 6;
private boolean mRestartPreview = false;
private int mSnapshotMode;
@@ -216,12 +212,6 @@ public class PhotoModule
private static final String PERSIST_LONGSHOT_MAX_SNAP = "persist.camera.longshot.max";
private static int mLongShotMaxSnap = -1;
- private static final int MINIMUM_BRIGHTNESS = 0;
- private static final int MAXIMUM_BRIGHTNESS = 6;
- private static final int DEFAULT_BRIGHTNESS = 3;
- private int mbrightness = 3;
- private int mbrightness_step = 1;
- private ProgressBar brightnessProgressBar;
// Constant from android.hardware.Camera.Parameters
private static final String KEY_PICTURE_FORMAT = "picture-format";
private static final String KEY_QC_RAW_PICUTRE_SIZE = "raw-size";
@@ -513,17 +503,6 @@ public class PhotoModule
mLocationManager = new LocationManager(mActivity, mUI);
mSensorManager = (SensorManager)(mActivity.getSystemService(Context.SENSOR_SERVICE));
- brightnessProgressBar = (ProgressBar)mRootView.findViewById(R.id.progress);
- if (brightnessProgressBar instanceof SeekBar) {
- SeekBar seeker = (SeekBar) brightnessProgressBar;
- seeker.setOnSeekBarChangeListener(mSeekListener);
- }
- brightnessProgressBar.setMax(MAXIMUM_BRIGHTNESS);
- mbrightness = mPreferences.getInt(
- CameraSettings.KEY_BRIGHTNESS,
- DEFAULT_BRIGHTNESS);
- brightnessProgressBar.setProgress(mbrightness);
- brightnessProgressBar.setVisibility(View.INVISIBLE);
Storage.setSaveSDCard(
mPreferences.getString(CameraSettings.KEY_CAMERA_SAVEPATH, "0").equals("1"));
@@ -1417,16 +1396,6 @@ public class PhotoModule
}
}
- private OnSeekBarChangeListener mSeekListener = new OnSeekBarChangeListener() {
- public void onStartTrackingTouch(SeekBar bar) {
- // no support
- }
- public void onProgressChanged(SeekBar bar, int progress, boolean fromtouch) {
- }
- public void onStopTrackingTouch(SeekBar bar) {
- }
- };
-
private final class AutoFocusCallback implements CameraAFCallback {
@Override
public void onAutoFocus(
@@ -2517,54 +2486,6 @@ public class PhotoModule
onShutterButtonClick();
}
return true;
- case KeyEvent.KEYCODE_DPAD_LEFT:
- if (!CameraUtil.isSupported(mParameters, "luma-adaptation")) {
- break;
- }
- if ( (mCameraState != PREVIEW_STOPPED) && (mFocusManager != null) &&
- (mFocusManager.getCurrentFocusState() != mFocusManager.STATE_FOCUSING) &&
- (mFocusManager.getCurrentFocusState() != mFocusManager.STATE_FOCUSING_SNAP_ON_FINISH) ) {
- if (mbrightness > MINIMUM_BRIGHTNESS) {
- mbrightness-=mbrightness_step;
- synchronized (mCameraDevice) {
- /* Set the "luma-adaptation" parameter */
- mParameters = mCameraDevice.getParameters();
- mParameters.set("luma-adaptation", String.valueOf(mbrightness));
- mCameraDevice.setParameters(mParameters);
- }
- }
- brightnessProgressBar.setProgress(mbrightness);
- Editor editor = mPreferences.edit();
- editor.putInt(CameraSettings.KEY_BRIGHTNESS, mbrightness);
- editor.apply();
- brightnessProgressBar.setVisibility(View.INVISIBLE);
- mBrightnessVisible = true;
- }
- break;
- case KeyEvent.KEYCODE_DPAD_RIGHT:
- if (!CameraUtil.isSupported(mParameters, "luma-adaptation")) {
- break;
- }
- if ( (mCameraState != PREVIEW_STOPPED) && (mFocusManager != null) &&
- (mFocusManager.getCurrentFocusState() != mFocusManager.STATE_FOCUSING) &&
- (mFocusManager.getCurrentFocusState() != mFocusManager.STATE_FOCUSING_SNAP_ON_FINISH) ) {
- if (mbrightness < MAXIMUM_BRIGHTNESS) {
- mbrightness+=mbrightness_step;
- synchronized (mCameraDevice) {
- /* Set the "luma-adaptation" parameter */
- mParameters = mCameraDevice.getParameters();
- mParameters.set("luma-adaptation", String.valueOf(mbrightness));
- mCameraDevice.setParameters(mParameters);
- }
- }
- brightnessProgressBar.setProgress(mbrightness);
- Editor editor = mPreferences.edit();
- editor.putInt(CameraSettings.KEY_BRIGHTNESS, mbrightness);
- editor.apply();
- brightnessProgressBar.setVisibility(View.INVISIBLE);
- mBrightnessVisible = true;
- }
- break;
case KeyEvent.KEYCODE_DPAD_CENTER:
// If we get a dpad center event without any focused view, move
// the focus to the shutter button and press it.
@@ -2807,9 +2728,6 @@ public class PhotoModule
/** This can run on a background thread, so don't do UI updates here.*/
private void qcomUpdateCameraParametersPreference() {
//qcom Related Parameter update
- //Set Brightness.
- mParameters.set("luma-adaptation", String.valueOf(mbrightness));
-
String longshot_enable = mPreferences.getString(
CameraSettings.KEY_LONGSHOT,
mActivity.getString(R.string.pref_camera_longshot_default));