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

Commit 49fa0405 authored by Michael Kwan's avatar Michael Kwan Committed by android-build-merger
Browse files

Merge "Only modify window layout params when necessary." into cw-f-dev am: 9fbd981f

am: a26e371c

Change-Id: I72bf9b5fa5dfaaa7573115ed5b6cca23a0be05f4
parents b98f76e2 a26e371c
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -3016,11 +3016,15 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
                    @Override
                    public void onSwipeCancelled(SwipeDismissLayout layout) {
                        WindowManager.LayoutParams newParams = getAttributes();
                        // Swipe changes only affect the x-translation and alpha, check to see if
                        // those values have changed first before resetting them.
                        if (newParams.x != 0 || newParams.alpha != 1) {
                            newParams.x = 0;
                            newParams.alpha = 1;
                            setAttributes(newParams);
                            setFlags(FLAG_FULLSCREEN, FLAG_FULLSCREEN | FLAG_LAYOUT_NO_LIMITS);
                        }
                    }
                });
    }