summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2012-12-12 11:52:03 -0800
committerFabrice Di Meglio <fdimeglio@google.com>2012-12-12 11:52:03 -0800
commit350993591974a8c7a2eca665f96304d296104789 (patch)
treea00369450feb420fa9ec18f3d122e2a3593de8ec /libs
parent2b89f73ef805022c4e8b9bad545c1aa0421e5586 (diff)
downloadframeworks_base-350993591974a8c7a2eca665f96304d296104789.zip
frameworks_base-350993591974a8c7a2eca665f96304d296104789.tar.gz
frameworks_base-350993591974a8c7a2eca665f96304d296104789.tar.bz2
Fix bug #7724071 ImageView drawable is not loaded correctly when changing Locale
aapt is not generating the correct CONFIG_LAYOUTDIR bit when a Drawable has a LTR and RTL version. It was generating instead the wrong CONFIG_SCREEN_LAYOUT bit. This was linked to the fact that the layout direction bits are contained into the screen layout bit. So now make sure that we are generating the correct CONFIG_LAYOUTDIR bit. Change-Id: If17c84d31e6c128721ed97ee6711660b131bf941
Diffstat (limited to 'libs')
-rw-r--r--libs/androidfw/ResourceTypes.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index 0107da4..dfef47e 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -1526,7 +1526,8 @@ int ResTable_config::diff(const ResTable_config& o) const {
if (navigation != o.navigation) diffs |= CONFIG_NAVIGATION;
if (screenSize != o.screenSize) diffs |= CONFIG_SCREEN_SIZE;
if (version != o.version) diffs |= CONFIG_VERSION;
- if (screenLayout != o.screenLayout) diffs |= CONFIG_SCREEN_LAYOUT;
+ if ((screenLayout & MASK_LAYOUTDIR) != (o.screenLayout & MASK_LAYOUTDIR)) diffs |= CONFIG_LAYOUTDIR;
+ if ((screenLayout & ~MASK_LAYOUTDIR) != (o.screenLayout & ~MASK_LAYOUTDIR)) diffs |= CONFIG_SCREEN_LAYOUT;
if (uiMode != o.uiMode) diffs |= CONFIG_UI_MODE;
if (smallestScreenWidthDp != o.smallestScreenWidthDp) diffs |= CONFIG_SMALLEST_SCREEN_SIZE;
if (screenSizeDp != o.screenSizeDp) diffs |= CONFIG_SCREEN_SIZE;