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

Commit 78811830 authored by Fengjiang Li's avatar Fengjiang Li
Browse files

[Predictive Back] Fix widget edu back swipe

Fix: 329389275
Flag: aconfig com.android.launcher3.enable_predictive_back_gesture TEAMFOOD
Test: Manual - attach video to bug
Change-Id: Ia8fb438068b0d324f4a535ff9e8b05fec46138f1
parent b5f0d063
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -300,12 +300,6 @@ public abstract class AbstractSlideInView<T extends Context & ActivityContext>
        invalidate();
    }

    @Override
    public void onBackInvoked() {
        super.onBackInvoked();
        animateSlideInViewToNoScale();
    }

    @Override
    public void onBackCancelled() {
        super.onBackCancelled();
+7 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ public class WidgetsEduView extends AbstractSlideInView<BaseActivity> implements
        mContent = findViewById(R.id.edu_view);
        findViewById(R.id.edu_close_button)
                .setOnClickListener(v -> close(/* animate= */ true));
        setContentBackgroundWithParent(mContent.getBackground(), mContent);
    }

    @Override
@@ -68,6 +69,12 @@ public class WidgetsEduView extends AbstractSlideInView<BaseActivity> implements
                mContent.getPaddingTop(), mContent.getPaddingEnd(), insets.bottom);
    }

    @Override
    protected void onScaleProgressChanged() {
        super.onScaleProgressChanged();
        setTranslationY(getMeasuredHeight() * (1 - mSlideInViewScale.value) / 2);
    }

    private void show() {
        attachToContainer();
        animateOpen();