Merge "Use "ldrtl" and "ldltr" config qualifiers for RTL / LTR resources" into jb-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
01fcb72894
@@ -536,8 +536,8 @@ public final class Configuration implements Parcelable, Comparable<Configuration
|
|||||||
int layoutDir = (screenLayout&SCREENLAYOUT_LAYOUTDIR_MASK);
|
int layoutDir = (screenLayout&SCREENLAYOUT_LAYOUTDIR_MASK);
|
||||||
switch (layoutDir) {
|
switch (layoutDir) {
|
||||||
case SCREENLAYOUT_LAYOUTDIR_UNDEFINED: sb.append(" ?layoutDir"); break;
|
case SCREENLAYOUT_LAYOUTDIR_UNDEFINED: sb.append(" ?layoutDir"); break;
|
||||||
case SCREENLAYOUT_LAYOUTDIR_LTR: sb.append(" ltr"); break;
|
case SCREENLAYOUT_LAYOUTDIR_LTR: sb.append(" ldltr"); break;
|
||||||
case SCREENLAYOUT_LAYOUTDIR_RTL: sb.append(" rtl"); break;
|
case SCREENLAYOUT_LAYOUTDIR_RTL: sb.append(" ldrtl"); break;
|
||||||
default: sb.append(" layoutDir=");
|
default: sb.append(" layoutDir=");
|
||||||
sb.append(layoutDir >> SCREENLAYOUT_LAYOUTDIR_SHIFT); break;
|
sb.append(layoutDir >> SCREENLAYOUT_LAYOUTDIR_SHIFT); break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2061,10 +2061,10 @@ String8 ResTable_config::toString() const {
|
|||||||
if (res.size() > 0) res.append("-");
|
if (res.size() > 0) res.append("-");
|
||||||
switch (screenLayout&ResTable_config::MASK_LAYOUTDIR) {
|
switch (screenLayout&ResTable_config::MASK_LAYOUTDIR) {
|
||||||
case ResTable_config::LAYOUTDIR_LTR:
|
case ResTable_config::LAYOUTDIR_LTR:
|
||||||
res.append("ltr");
|
res.append("ldltr");
|
||||||
break;
|
break;
|
||||||
case ResTable_config::LAYOUTDIR_RTL:
|
case ResTable_config::LAYOUTDIR_RTL:
|
||||||
res.append("rtl");
|
res.append("ldrtl");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
res.appendFormat("layoutDir=%d",
|
res.appendFormat("layoutDir=%d",
|
||||||
|
|||||||
@@ -995,12 +995,12 @@ bool AaptGroupEntry::getLayoutDirectionName(const char* name, ResTable_config* o
|
|||||||
(out->screenLayout&~ResTable_config::MASK_LAYOUTDIR)
|
(out->screenLayout&~ResTable_config::MASK_LAYOUTDIR)
|
||||||
| ResTable_config::LAYOUTDIR_ANY;
|
| ResTable_config::LAYOUTDIR_ANY;
|
||||||
return true;
|
return true;
|
||||||
} else if (strcmp(name, "ltr") == 0) {
|
} else if (strcmp(name, "ldltr") == 0) {
|
||||||
if (out) out->screenLayout =
|
if (out) out->screenLayout =
|
||||||
(out->screenLayout&~ResTable_config::MASK_LAYOUTDIR)
|
(out->screenLayout&~ResTable_config::MASK_LAYOUTDIR)
|
||||||
| ResTable_config::LAYOUTDIR_LTR;
|
| ResTable_config::LAYOUTDIR_LTR;
|
||||||
return true;
|
return true;
|
||||||
} else if (strcmp(name, "rtl") == 0) {
|
} else if (strcmp(name, "ldrtl") == 0) {
|
||||||
if (out) out->screenLayout =
|
if (out) out->screenLayout =
|
||||||
(out->screenLayout&~ResTable_config::MASK_LAYOUTDIR)
|
(out->screenLayout&~ResTable_config::MASK_LAYOUTDIR)
|
||||||
| ResTable_config::LAYOUTDIR_RTL;
|
| ResTable_config::LAYOUTDIR_RTL;
|
||||||
|
|||||||
Reference in New Issue
Block a user