summaryrefslogtreecommitdiffstats
path: root/core/jni
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2014-10-02 12:38:21 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-02 12:38:21 +0000
commite18d68d6ab2f5354441162719ec87cb57de83519 (patch)
tree2cb0e8c9128ce020d36f04c03fecde706d9f2035 /core/jni
parent30c284fc460218652ffa89aed3da41225ad9b7cc (diff)
parent4e789dbff0bc4d9c259a33d6e8ea595c0f4d5f35 (diff)
downloadframeworks_base-e18d68d6ab2f5354441162719ec87cb57de83519.zip
frameworks_base-e18d68d6ab2f5354441162719ec87cb57de83519.tar.gz
frameworks_base-e18d68d6ab2f5354441162719ec87cb57de83519.tar.bz2
am 4e789dbf: am 8628387c: am b226d295: am c6a06d43: Merge "Revert "Fix issue with using locally defined attrs in a shared lib"" into lmp-dev
* commit '4e789dbff0bc4d9c259a33d6e8ea595c0f4d5f35': Revert "Fix issue with using locally defined attrs in a shared lib"
Diffstat (limited to 'core/jni')
-rw-r--r--core/jni/android_util_AssetManager.cpp27
1 files changed, 4 insertions, 23 deletions
diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp
index 8753660..4859ee6 100644
--- a/core/jni/android_util_AssetManager.cpp
+++ b/core/jni/android_util_AssetManager.cpp
@@ -1324,21 +1324,7 @@ static jboolean android_content_AssetManager_applyStyle(JNIEnv* env, jobject cla
config.density = 0;
// Skip through XML attributes until the end or the next possible match.
- // We make two assumptions about the order of attributes:
- // 1) Among attributes with the same package ID, the attributes are
- // sorted by increasing resource ID.
- // 2) Groups of attributes with the same package ID are in the same
- // order.
- // 3) The same sorting is applied to the input attributes as is
- // to the attributes in the XML.
- //
- // ex: 02010000, 02010001, 010100f4, 010100f5
- //
- // The total order of attributes (including package ID) can not be linear
- // as shared libraries get assigned dynamic package IDs at runtime, which
- // may break the sort order established at build time.
- while (ix < NX && (Res_GETPACKAGE(curIdent) != Res_GETPACKAGE(curXmlAttr) ||
- curIdent > curXmlAttr)) {
+ while (ix < NX && curIdent > curXmlAttr) {
ix++;
curXmlAttr = xmlParser->getAttributeNameResID(ix);
}
@@ -1353,9 +1339,7 @@ static jboolean android_content_AssetManager_applyStyle(JNIEnv* env, jobject cla
}
// Skip through the style values until the end or the next possible match.
- while (styleEnt < endStyleEnt &&
- (Res_GETPACKAGE(curIdent) != Res_GETPACKAGE(styleEnt->map.name.ident) ||
- curIdent > styleEnt->map.name.ident)) {
+ while (styleEnt < endStyleEnt && curIdent > styleEnt->map.name.ident) {
styleEnt++;
}
// Retrieve the current style attribute if it matches, and step to next.
@@ -1371,9 +1355,7 @@ static jboolean android_content_AssetManager_applyStyle(JNIEnv* env, jobject cla
}
// Skip through the default style values until the end or the next possible match.
- while (defStyleEnt < endDefStyleEnt &&
- (Res_GETPACKAGE(curIdent) != Res_GETPACKAGE(defStyleEnt->map.name.ident) ||
- curIdent > defStyleEnt->map.name.ident)) {
+ while (defStyleEnt < endDefStyleEnt && curIdent > defStyleEnt->map.name.ident) {
defStyleEnt++;
}
// Retrieve the current default style attribute if it matches, and step to next.
@@ -1535,8 +1517,7 @@ static jboolean android_content_AssetManager_retrieveAttributes(JNIEnv* env, job
config.density = 0;
// Skip through XML attributes until the end or the next possible match.
- while (ix < NX && (Res_GETPACKAGE(curIdent) != Res_GETPACKAGE(curXmlAttr) ||
- curIdent > curXmlAttr)) {
+ while (ix < NX && curIdent > curXmlAttr) {
ix++;
curXmlAttr = xmlParser->getAttributeNameResID(ix);
}