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

Commit 0dcd7fee authored by Demon000's avatar Demon000 Committed by Łukasz Patron
Browse files

Revert "FODCircleView: dispatch onPress to HAL only after dimming is applied"

This break the behavior for people returning 0 as dim amount, which is the
case when using in-kernel dimming.

This reverts commit 7ebd24f3.

Change-Id: Iefab260334d3232a41d59cc07b5f83f5136e8cec
parent 969002a1
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -74,8 +74,6 @@ public class FODCircleView extends ImageView {
    private boolean mIsShowing;
    private boolean mIsCircleShowing;

    private float mCurrentDimAmount = 0.0f;

    private Handler mHandler;

    private LockPatternUtils mLockPatternUtils;
@@ -194,16 +192,6 @@ public class FODCircleView extends ImageView {

        mUpdateMonitor = KeyguardUpdateMonitor.getInstance(context);
        mUpdateMonitor.registerCallback(mMonitorCallback);

        getViewTreeObserver().addOnGlobalLayoutListener(() -> {
            float drawingDimAmount = mParams.dimAmount;
            if (mCurrentDimAmount == 0.0f && drawingDimAmount > 0.0f) {
                dispatchPress();
                mCurrentDimAmount = drawingDimAmount;
            } else if (mCurrentDimAmount > 0.0f && drawingDimAmount == 0.0f) {
                mCurrentDimAmount = drawingDimAmount;
            }
        });
    }

    @Override
@@ -297,6 +285,7 @@ public class FODCircleView extends ImageView {

        setDim(true);
        updateAlpha();
        dispatchPress();

        mPaintFingerprint.setColor(mColor);
        setImageDrawable(null);