From 71922de6c8e407ff24bb1a500cb53bb1a647c758 Mon Sep 17 00:00:00 2001 From: Alan Viverette Date: Mon, 12 Jan 2015 16:14:02 -0800 Subject: [PATCH] Update docs for Window.setElevation(), apply changes immediately BUG: 18983689 Change-Id: I471104092d6296dc0ba2689da96783be088fbce8 --- core/java/android/view/Window.java | 4 ++++ policy/src/com/android/internal/policy/impl/PhoneWindow.java | 1 + 2 files changed, 5 insertions(+) diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java index 55c6cb89c936e..3d5d3faa8c16e 100644 --- a/core/java/android/view/Window.java +++ b/core/java/android/view/Window.java @@ -1087,6 +1087,10 @@ public abstract class Window { /** * Sets the window elevation. + *

+ * Changes to this property take effect immediately and will cause the + * window surface to be recreated. This is an expensive operation and as a + * result, this property should not be animated. * * @param elevation The window elevation. * @see View#setElevation(float) diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index 30a271e0aa96c..1f9867008ba38 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -1338,6 +1338,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { if (mDecor != null) { mDecor.setElevation(elevation); } + dispatchWindowAttributesChanged(getAttributes()); } @Override