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

Commit 39dd370d authored by Michael Kwan's avatar Michael Kwan
Browse files

Check if the activity translucency was converted before converted back.

Bug: 34084490
Change-Id: Ib04c76549a31c7e523649f9d284637d44d7477ae
parent 5df216f2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ public class SwipeDismissLayout extends FrameLayout {
    private VelocityTracker mVelocityTracker;
    private float mTranslationX;
    private boolean mBlockGesture = false;
    private boolean mActivityTranslucencyConverted = false;

    private final DismissAnimator mDismissAnimator = new DismissAnimator();

@@ -277,8 +278,9 @@ public class SwipeDismissLayout extends FrameLayout {
    protected void cancel() {
        if (!mIsWindowNativelyTranslucent) {
            Activity activity = findActivity();
            if (activity != null) {
            if (activity != null && mActivityTranslucencyConverted) {
                activity.convertFromTranslucent();
                mActivityTranslucencyConverted = false;
            }
        }
        if (mProgressListener != null) {
@@ -319,7 +321,7 @@ public class SwipeDismissLayout extends FrameLayout {
            if (!mIsWindowNativelyTranslucent) {
                Activity activity = findActivity();
                if (activity != null) {
                    activity.convertToTranslucent(null, null);
                    mActivityTranslucencyConverted = activity.convertToTranslucent(null, null);
                }
            }
        }