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

Commit 6d7dc11e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Check if the activity translucency was converted before converted back." into cw-f-dev

parents b08db484 39dd370d
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);
                }
            }
        }