From 31678b52e4b65e8e4d22ef5dced713424e5deada Mon Sep 17 00:00:00 2001 From: Craig Mautner Date: Mon, 12 Aug 2013 17:56:34 -0700 Subject: Fix Configuration layout direction comparison. If the Configuration layout direction is not changing don't indicate that it has changed. When the indication is made incorrectly it causes the window manager to believe that the configuration has changed and it will start freezing the screen and setting up animations. Bad jank is the result. In Configuration.updateFrom() anytime that the screenLayouts were different the code was setting ActivityInfo.CONFIG_LAYOUT_DIRECTION in the return bitmask. Even if the only difference was between UNDEFINED fields. This fix makes sure that the layout direction field has actually changed before setting ActivityInfo.CONFIG_LAYOUT_DIRECTION in the return bitmask. In Configuration.diff() if the passed Configuration had SCREENLAYOUT_LAYOUTDIR_UNDEFINED the code was setting ActivityInfo.CONFIG_LAYOUT_DIRECTION in the return bitmask. This fix makes sure that if the passed Configuration has fields set to SCREENLAYOUT_*_UNDEFINED then corresponding bits will no longer be set in the returned bitmask. Fixes bug 10291622. Fixes bug 10247094. Change-Id: If26de662206fe85dc4671adbae39dfb99dc1038c --- core/java/android/content/res/Configuration.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java index 1c281387fce8..0402eeb94764 100644 --- a/core/java/android/content/res/Configuration.java +++ b/core/java/android/content/res/Configuration.java @@ -786,9 +786,11 @@ public final class Configuration implements Parcelable, Comparable