Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 808dbe19 authored by nicolasroard's avatar nicolasroard Committed by Android (Google) Code Review
Browse files

Merge "Add back button handling" into gb-ub-photos-arches

parents 423e45e4 75608166
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -712,6 +712,12 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
        };
        };
    }
    }


    @Override
    public void onBackPressed() {
        if (mPanelController.onBackPressed()) {
            finish();
        }
    }
    // //////////////////////////////////////////////////////////////////////////////
    // //////////////////////////////////////////////////////////////////////////////


    public float getPixelsFromDip(float value) {
    public float getPixelsFromDip(float value) {
+11 −1
Original line number Original line Diff line number Diff line
@@ -229,6 +229,16 @@ public class PanelController implements OnClickListener {
        imageShow.setPanelController(this);
        imageShow.setPanelController(this);
    }
    }


    public boolean onBackPressed() {
        if (mUtilityPanel == null || !mUtilityPanel.selected()) {
            return true;
        }
        mCurrentImage.resetParameter();
        showPanel(mCurrentPanel);
        mCurrentImage.select();
        return false;
    }

    public void onNewValue(int value) {
    public void onNewValue(int value) {
        mUtilityPanel.onNewValue(value);
        mUtilityPanel.onNewValue(value);
    }
    }
@@ -422,7 +432,7 @@ public class PanelController implements OnClickListener {
            }
            }
            case R.id.curvesButtonRGB: {
            case R.id.curvesButtonRGB: {
                ImageCurves curves = (ImageCurves) showImageView(R.id.imageCurves);
                ImageCurves curves = (ImageCurves) showImageView(R.id.imageCurves);
                String ename = mCurrentImage.getContext().getString(R.string.curvesRGB);
                String ename = curves.getContext().getString(R.string.curvesRGB);
                mUtilityPanel.setEffectName(ename);
                mUtilityPanel.setEffectName(ename);
                mUtilityPanel.setShowParameter(false);
                mUtilityPanel.setShowParameter(false);
                curves.setUseRed(true);
                curves.setUseRed(true);
+0 −1
Original line number Original line Diff line number Diff line
@@ -18,7 +18,6 @@ public class ImageFilterWBalance extends ImageFilter {
    public Bitmap apply(Bitmap bitmap, float scaleFactor, boolean highQuality) {
    public Bitmap apply(Bitmap bitmap, float scaleFactor, boolean highQuality) {
        int w = bitmap.getWidth();
        int w = bitmap.getWidth();
        int h = bitmap.getHeight();
        int h = bitmap.getHeight();
        Log.v(TAG,"White Balance Call");
        nativeApplyFilter(bitmap, w, h, -1,-1);
        nativeApplyFilter(bitmap, w, h, -1,-1);
        return bitmap;
        return bitmap;
    }
    }