summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CaptureUI.java
diff options
context:
space:
mode:
authorWeijie Wang <weijiew@codeaurora.org>2017-09-02 12:11:20 +0800
committerWeijie Wang <weijiew@codeaurora.org>2017-09-02 12:11:20 +0800
commitf884ef3a01cefaf71f6ff0ed059c8d356b40c17c (patch)
treeb4b545a0cd632402dddc406247fcd7836b408b84 /src/com/android/camera/CaptureUI.java
parent2e0ed791732a27bb4d951bfbdaba3ddcda4e6b2c (diff)
downloadandroid_packages_apps_Snap-f884ef3a01cefaf71f6ff0ed059c8d356b40c17c.tar.gz
android_packages_apps_Snap-f884ef3a01cefaf71f6ff0ed059c8d356b40c17c.tar.bz2
android_packages_apps_Snap-f884ef3a01cefaf71f6ff0ed059c8d356b40c17c.zip
Revert "SnapdragonCamera: Sync LA.UM.6.4 to LA.UM.6.3"
This reverts commit b5533d51a7c97138235d29b35cec876d107aeadd. Change-Id: I8063422680802e25d03a374be91e884a86ad55e9
Diffstat (limited to 'src/com/android/camera/CaptureUI.java')
-rwxr-xr-x[-rw-r--r--]src/com/android/camera/CaptureUI.java24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/com/android/camera/CaptureUI.java b/src/com/android/camera/CaptureUI.java
index d0b129ad9..6ec09effd 100644..100755
--- a/src/com/android/camera/CaptureUI.java
+++ b/src/com/android/camera/CaptureUI.java
@@ -306,10 +306,8 @@ public class CaptureUI implements FocusOverlayManager.FocusUI,
mMakeupSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progresValue, boolean fromUser) {
- if ( progresValue != 0 ) {
- int value = 10 + 9 * progresValue / 10;
- mSettingsManager.setValue(SettingsManager.KEY_MAKEUP, value + "");
- }
+ int value = progresValue/10*10;
+ mSettingsManager.setValue(SettingsManager.KEY_MAKEUP, value+"");
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
@@ -486,8 +484,8 @@ public class CaptureUI implements FocusOverlayManager.FocusUI,
showFirstTimeHelp();
}
- protected void showCapturedImageForReview(byte[] jpegData, int orientation) {
- mDecodeTaskForReview = new CaptureUI.DecodeImageForReview(jpegData, orientation);
+ protected void showCapturedImageForReview(byte[] jpegData, int orientation, boolean mirror) {
+ mDecodeTaskForReview = new CaptureUI.DecodeImageForReview(jpegData, orientation, mirror);
mDecodeTaskForReview.execute();
if (getCurrentIntentMode() != CaptureModule.INTENT_MODE_NORMAL) {
if (mFilterMenuStatus == FILTER_MENU_ON) {
@@ -1739,18 +1737,24 @@ 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) {
+ public DecodeTask(byte[] data, int orientation, boolean mirror) {
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) && (bitmap != null)) {
+ if ((mOrientation != 0 || mMirror) && (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);
@@ -1764,8 +1768,8 @@ public class CaptureUI implements FocusOverlayManager.FocusUI,
}
private class DecodeImageForReview extends CaptureUI.DecodeTask {
- public DecodeImageForReview(byte[] data, int orientation) {
- super(data, orientation);
+ public DecodeImageForReview(byte[] data, int orientation, boolean mirror) {
+ super(data, orientation, mirror);
}
@Override