From 8a802dbdabdfd27692c2e38b2c3adafe95566106 Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Wed, 5 Sep 2012 13:12:02 -0700 Subject: [PATCH] Use "ldrtl" and "ldltr" config qualifiers for RTL / LTR resources - we cannot use "rtl" / "ltr" qualifiers as they can conflict with ISO-639 Alpha-3 codespace which uses 3 letters for identifying a language code (and could use either "rtl" or "ltr" strings for defining a language in the future). - we are using instead "ldrtl" for RTL and "ldltr" for LTR resources. Those qualifiers are defined by more than 3 chars and outside of what is defined into ISO-639. They are also more understandable as "ld" prefix is for "layoutdirection" Change-Id: Id43e948103707e09bef63ebd54ac1779dde58e72 --- core/java/android/content/res/Configuration.java | 4 ++-- libs/androidfw/ResourceTypes.cpp | 4 ++-- tools/aapt/AaptAssets.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java index 0b7784222a129..71647130646b6 100644 --- a/core/java/android/content/res/Configuration.java +++ b/core/java/android/content/res/Configuration.java @@ -536,8 +536,8 @@ public final class Configuration implements Parcelable, ComparablescreenLayout&~ResTable_config::MASK_LAYOUTDIR) | ResTable_config::LAYOUTDIR_ANY; return true; - } else if (strcmp(name, "ltr") == 0) { + } else if (strcmp(name, "ldltr") == 0) { if (out) out->screenLayout = (out->screenLayout&~ResTable_config::MASK_LAYOUTDIR) | ResTable_config::LAYOUTDIR_LTR; return true; - } else if (strcmp(name, "rtl") == 0) { + } else if (strcmp(name, "ldrtl") == 0) { if (out) out->screenLayout = (out->screenLayout&~ResTable_config::MASK_LAYOUTDIR) | ResTable_config::LAYOUTDIR_RTL;