Merge "Only modify window layout params when necessary." into cw-f-dev
am: 9fbd981f23
Change-Id: I14316841b80bdb25755e174528ef4bb271d3e005
This commit is contained in:
@@ -3016,10 +3016,14 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
|
|||||||
@Override
|
@Override
|
||||||
public void onSwipeCancelled(SwipeDismissLayout layout) {
|
public void onSwipeCancelled(SwipeDismissLayout layout) {
|
||||||
WindowManager.LayoutParams newParams = getAttributes();
|
WindowManager.LayoutParams newParams = getAttributes();
|
||||||
newParams.x = 0;
|
// Swipe changes only affect the x-translation and alpha, check to see if
|
||||||
newParams.alpha = 1;
|
// those values have changed first before resetting them.
|
||||||
setAttributes(newParams);
|
if (newParams.x != 0 || newParams.alpha != 1) {
|
||||||
setFlags(FLAG_FULLSCREEN, FLAG_FULLSCREEN | FLAG_LAYOUT_NO_LIMITS);
|
newParams.x = 0;
|
||||||
|
newParams.alpha = 1;
|
||||||
|
setAttributes(newParams);
|
||||||
|
setFlags(FLAG_FULLSCREEN, FLAG_FULLSCREEN | FLAG_LAYOUT_NO_LIMITS);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user