diff --git a/core/java/com/android/internal/policy/PhoneWindow.java b/core/java/com/android/internal/policy/PhoneWindow.java index 84195b2a270ab..804bd29da7960 100644 --- a/core/java/com/android/internal/policy/PhoneWindow.java +++ b/core/java/com/android/internal/policy/PhoneWindow.java @@ -3022,10 +3022,14 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { @Override public void onSwipeCancelled(SwipeDismissLayout layout) { WindowManager.LayoutParams newParams = getAttributes(); - newParams.x = 0; - newParams.alpha = 1; - setAttributes(newParams); - setFlags(FLAG_FULLSCREEN, FLAG_FULLSCREEN | FLAG_LAYOUT_NO_LIMITS); + // 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); + } } }); }