Don't destroy a window's buffers when moving it
Change-Id: Ib08608373ae4299639c1b157421ba633e4293446
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index fb31e7d..96c1512 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -1252,7 +1252,11 @@
public static final int INPUT_FEATURES_CHANGED = 1<<15;
/** {@hide} */
public static final int PRIVATE_FLAGS_CHANGED = 1<<16;
-
+ /** {@hide} */
+ public static final int BUFFER_CHANGED = 1<<17;
+ /** {@hide} */
+ public static final int EVERYTHING_CHANGED = 0xffffffff;
+
// internal buffer to backup/restore parameters under compatibility mode.
private int[] mCompatibilityParamsBackup = null;
@@ -1261,11 +1265,11 @@
if (width != o.width) {
width = o.width;
- changes |= LAYOUT_CHANGED;
+ changes |= LAYOUT_CHANGED | BUFFER_CHANGED;
}
if (height != o.height) {
height = o.height;
- changes |= LAYOUT_CHANGED;
+ changes |= LAYOUT_CHANGED | BUFFER_CHANGED;
}
if (x != o.x) {
x = o.x;
@@ -1277,19 +1281,19 @@
}
if (horizontalWeight != o.horizontalWeight) {
horizontalWeight = o.horizontalWeight;
- changes |= LAYOUT_CHANGED;
+ changes |= LAYOUT_CHANGED | BUFFER_CHANGED;
}
if (verticalWeight != o.verticalWeight) {
verticalWeight = o.verticalWeight;
- changes |= LAYOUT_CHANGED;
+ changes |= LAYOUT_CHANGED | BUFFER_CHANGED;
}
if (horizontalMargin != o.horizontalMargin) {
horizontalMargin = o.horizontalMargin;
- changes |= LAYOUT_CHANGED;
+ changes |= LAYOUT_CHANGED | BUFFER_CHANGED;
}
if (verticalMargin != o.verticalMargin) {
verticalMargin = o.verticalMargin;
- changes |= LAYOUT_CHANGED;
+ changes |= LAYOUT_CHANGED | BUFFER_CHANGED;
}
if (type != o.type) {
type = o.type;
@@ -1297,7 +1301,7 @@
}
if (flags != o.flags) {
flags = o.flags;
- changes |= FLAGS_CHANGED;
+ changes |= FLAGS_CHANGED | BUFFER_CHANGED;
}
if (privateFlags != o.privateFlags) {
privateFlags = o.privateFlags;
@@ -1309,11 +1313,11 @@
}
if (gravity != o.gravity) {
gravity = o.gravity;
- changes |= LAYOUT_CHANGED;
+ changes |= LAYOUT_CHANGED | BUFFER_CHANGED;
}
if (format != o.format) {
format = o.format;
- changes |= FORMAT_CHANGED;
+ changes |= FORMAT_CHANGED | BUFFER_CHANGED;
}
if (windowAnimations != o.windowAnimations) {
windowAnimations = o.windowAnimations;
@@ -1352,7 +1356,7 @@
if (screenOrientation != o.screenOrientation) {
screenOrientation = o.screenOrientation;
- changes |= SCREEN_ORIENTATION_CHANGED;
+ changes |= SCREEN_ORIENTATION_CHANGED | BUFFER_CHANGED;
}
if (systemUiVisibility != o.systemUiVisibility