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

Commit 20dc4923 authored by John Spurlock's avatar John Spurlock Committed by Android Git Automerger
Browse files

am 10b9ac80: Merge "Fix lockscreen camera preview position in RTL." into klp-dev

* commit '10b9ac80':
  Fix lockscreen camera preview position in RTL.
parents 78244c83 10b9ac80
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -243,11 +243,12 @@ public class CameraWidgetFrame extends KeyguardWidgetFrame implements View.OnCli
        final float pvTransX = pvWidth < thisWidth ? (thisWidth - pvWidth) / 2 : 0;
        final float pvTransY = pvHeight < thisHeight ? (thisHeight - pvHeight) / 2 : 0;

        mPreview.setPivotX(0);
        final boolean isRtl = mPreview.getLayoutDirection() == LAYOUT_DIRECTION_RTL;
        mPreview.setPivotX(isRtl ? mPreview.width : 0);
        mPreview.setPivotY(0);
        mPreview.setScaleX(pvScale);
        mPreview.setScaleY(pvScale);
        mPreview.setTranslationX(pvTransX);
        mPreview.setTranslationX((isRtl ? -1 : 1) * pvTransX);
        mPreview.setTranslationY(pvTransY);

        mRenderedSize.set(width, height);