summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CaptureUI.java
diff options
context:
space:
mode:
authorWeijie Wang <weijiew@codeaurora.org>2017-08-29 17:52:48 +0800
committerWeijie Wang <weijiew@codeaurora.org>2017-08-30 10:45:01 +0800
commitb5533d51a7c97138235d29b35cec876d107aeadd (patch)
tree3f92fc9d76f37f0efa4ee150322ebfdff50cb2c5 /src/com/android/camera/CaptureUI.java
parentcc7d48d76185ed95ff9b00dcc23373186257b03b (diff)
downloadandroid_packages_apps_Snap-b5533d51a7c97138235d29b35cec876d107aeadd.tar.gz
android_packages_apps_Snap-b5533d51a7c97138235d29b35cec876d107aeadd.tar.bz2
android_packages_apps_Snap-b5533d51a7c97138235d29b35cec876d107aeadd.zip
SnapdragonCamera: Sync LA.UM.6.4 to LA.UM.6.3
Sync LA.UM.6.4 to LA.UM.6.3 Change-Id: Ide9a53b3b5ea6d17154003e4059ae3125f9f3346
Diffstat (limited to 'src/com/android/camera/CaptureUI.java')
-rw-r--r--[-rwxr-xr-x]src/com/android/camera/CaptureUI.java24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/com/android/camera/CaptureUI.java b/src/com/android/camera/CaptureUI.java
index 6ec09effd..d0b129ad9 100755..100644
--- a/src/com/android/camera/CaptureUI.java
+++ b/src/com/android/camera/CaptureUI.java
@@ -306,8 +306,10 @@ public class CaptureUI implements FocusOverlayManager.FocusUI,
mMakeupSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progresValue, boolean fromUser) {
- int value = progresValue/10*10;
- mSettingsManager.setValue(SettingsManager.KEY_MAKEUP, value+"");
+ if ( progresValue != 0 ) {
+ int value = 10 + 9 * progresValue / 10;
+ mSettingsManager.setValue(SettingsManager.KEY_MAKEUP, value + "");
+ }
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
@@ -484,8 +486,8 @@ public class CaptureUI implements FocusOverlayManager.FocusUI,
showFirstTimeHelp();
}
- protected void showCapturedImageForReview(byte[] jpegData, int orientation, boolean mirror) {
- mDecodeTaskForReview = new CaptureUI.DecodeImageForReview(jpegData, orientation, mirror);
+ protected void showCapturedImageForReview(byte[] jpegData, int orientation) {
+ mDecodeTaskForReview = new CaptureUI.DecodeImageForReview(jpegData, orientation);
mDecodeTaskForReview.execute();
if (getCurrentIntentMode() != CaptureModule.INTENT_MODE_NORMAL) {
if (mFilterMenuStatus == FILTER_MENU_ON) {
@@ -1737,24 +1739,18 @@ public class CaptureUI implements FocusOverlayManager.FocusUI,
private class DecodeTask extends AsyncTask<Void, Void, Bitmap> {
private final byte [] mData;
private int mOrientation;
- private boolean mMirror;
- public DecodeTask(byte[] data, int orientation, boolean mirror) {
+ public DecodeTask(byte[] data, int orientation) {
mData = data;
mOrientation = orientation;
- mMirror = mirror;
}
@Override
protected Bitmap doInBackground(Void... params) {
Bitmap bitmap = CameraUtil.downSample(mData, mDownSampleFactor);
// Decode image in background.
- if ((mOrientation != 0 || mMirror) && (bitmap != null)) {
+ if ((mOrientation != 0) && (bitmap != null)) {
Matrix m = new Matrix();
- if (mMirror) {
- // Flip horizontally
- m.setScale(-1f, 1f);
- }
m.preRotate(mOrientation);
return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), m,
false);
@@ -1768,8 +1764,8 @@ public class CaptureUI implements FocusOverlayManager.FocusUI,
}
private class DecodeImageForReview extends CaptureUI.DecodeTask {
- public DecodeImageForReview(byte[] data, int orientation, boolean mirror) {
- super(data, orientation, mirror);
+ public DecodeImageForReview(byte[] data, int orientation) {
+ super(data, orientation);
}
@Override