Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

dalvik: Commit

dalvik


Commit MetaInfo

Revision59204263bcb85c07198c800fe4b4570588b71852 (tree)
Time2014-08-27 19:35:20
AuthorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

Android 4.4.4 Release 2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEABECAAYFAlO7IZkACgkQ6K0/gZqxDnhbUgCfTBJsCQoxJ8rfiliXACQUDyzX
eDcAn2Sca1SRMmh8lArdPUK/dROgDRtZ
=XI5V
-----END PGP SIGNATURE-----

Merge tag 'android-4.4.4_r2' into kitkat-x86

Android 4.4.4 Release 2

Conflicts:
vm/JarFile.cpp

Change Summary

Incremental Difference

--- a/dx/src/com/android/dx/command/dexer/Main.java
+++ b/dx/src/com/android/dx/command/dexer/Main.java
@@ -1477,8 +1477,9 @@ public class Main {
14771477 }
14781478
14791479 if (multiDex && numThreads != 1) {
1480- System.out.println(NUM_THREADS_OPTION + "is ignored when used with "
1480+ System.out.println(NUM_THREADS_OPTION + " is ignored when used with "
14811481 + MULTI_DEX_OPTION);
1482+ numThreads = 1;
14821483 }
14831484
14841485 if (multiDex && incremental) {
--- a/dx/src/com/android/dx/dex/cf/CfTranslator.java
+++ b/dx/src/com/android/dx/dex/cf/CfTranslator.java
@@ -142,20 +142,18 @@ public class CfTranslator {
142142 ConstantPool constantPool = cf.getConstantPool();
143143 int constantPoolSize = constantPool.size();
144144
145- synchronized (dexFile) {
146- for (int i = 0; i < constantPoolSize; i++) {
147- Constant constant = constantPool.getOrNull(i);
148- if (constant instanceof CstMethodRef) {
149- methodIdsSection.intern((CstBaseMethodRef) constant);
150- } else if (constant instanceof CstInterfaceMethodRef) {
151- methodIdsSection.intern(((CstInterfaceMethodRef) constant).toMethodRef());
152- } else if (constant instanceof CstFieldRef) {
153- fieldIdsSection.intern((CstFieldRef) constant);
154- } else if (constant instanceof CstEnumRef) {
155- fieldIdsSection.intern(((CstEnumRef) constant).getFieldRef());
156- } else if (constant instanceof CstType) {
157- typeIdsSection.intern((CstType) constant);
158- }
145+ for (int i = 0; i < constantPoolSize; i++) {
146+ Constant constant = constantPool.getOrNull(i);
147+ if (constant instanceof CstMethodRef) {
148+ methodIdsSection.intern((CstBaseMethodRef) constant);
149+ } else if (constant instanceof CstInterfaceMethodRef) {
150+ methodIdsSection.intern(((CstInterfaceMethodRef) constant).toMethodRef());
151+ } else if (constant instanceof CstFieldRef) {
152+ fieldIdsSection.intern((CstFieldRef) constant);
153+ } else if (constant instanceof CstEnumRef) {
154+ fieldIdsSection.intern(((CstEnumRef) constant).getFieldRef());
155+ } else if (constant instanceof CstType) {
156+ typeIdsSection.intern((CstType) constant);
159157 }
160158 }
161159
@@ -197,9 +195,7 @@ public class CfTranslator {
197195 if (annotations.size() != 0) {
198196 out.addFieldAnnotations(field, annotations);
199197 }
200- synchronized (fieldIdsSection) {
201- fieldIdsSection.intern(field);
202- }
198+ fieldIdsSection.intern(field);
203199 } catch (RuntimeException ex) {
204200 String msg = "...while processing " + one.getName().toHuman() +
205201 " " + one.getDescriptor().toHuman();
@@ -368,9 +364,7 @@ public class CfTranslator {
368364 if (list.size() != 0) {
369365 out.addParameterAnnotations(meth, list);
370366 }
371- synchronized (methodIds) {
372- methodIds.intern(meth);
373- }
367+ methodIds.intern(meth);
374368 } catch (RuntimeException ex) {
375369 String msg = "...while processing " + one.getName().toHuman() +
376370 " " + one.getDescriptor().toHuman();
--- a/dx/src/com/android/dx/dex/file/FieldIdsSection.java
+++ b/dx/src/com/android/dx/dex/file/FieldIdsSection.java
@@ -20,6 +20,7 @@ import com.android.dx.rop.cst.Constant;
2020 import com.android.dx.rop.cst.CstFieldRef;
2121 import com.android.dx.util.AnnotatedOutput;
2222 import com.android.dx.util.Hex;
23+
2324 import java.util.Collection;
2425 import java.util.TreeMap;
2526
@@ -94,7 +95,7 @@ public final class FieldIdsSection extends MemberIdsSection {
9495 * @param field {@code non-null;} the reference to intern
9596 * @return {@code non-null;} the interned reference
9697 */
97- public FieldIdItem intern(CstFieldRef field) {
98+ public synchronized FieldIdItem intern(CstFieldRef field) {
9899 if (field == null) {
99100 throw new NullPointerException("field == null");
100101 }
--- a/dx/src/com/android/dx/dex/file/MethodIdsSection.java
+++ b/dx/src/com/android/dx/dex/file/MethodIdsSection.java
@@ -20,6 +20,7 @@ import com.android.dx.rop.cst.Constant;
2020 import com.android.dx.rop.cst.CstBaseMethodRef;
2121 import com.android.dx.util.AnnotatedOutput;
2222 import com.android.dx.util.Hex;
23+
2324 import java.util.Collection;
2425 import java.util.TreeMap;
2526
@@ -94,7 +95,7 @@ public final class MethodIdsSection extends MemberIdsSection {
9495 * @param method {@code non-null;} the reference to intern
9596 * @return {@code non-null;} the interned reference
9697 */
97- public MethodIdItem intern(CstBaseMethodRef method) {
98+ public synchronized MethodIdItem intern(CstBaseMethodRef method) {
9899 if (method == null) {
99100 throw new NullPointerException("method == null");
100101 }
--- a/dx/src/com/android/dx/dex/file/TypeIdsSection.java
+++ b/dx/src/com/android/dx/dex/file/TypeIdsSection.java
@@ -128,7 +128,7 @@ public final class TypeIdsSection extends UniformItemSection {
128128 * @param type {@code non-null;} the type to intern
129129 * @return {@code non-null;} the interned reference
130130 */
131- public TypeIdItem intern(CstType type) {
131+ public synchronized TypeIdItem intern(CstType type) {
132132 if (type == null) {
133133 throw new NullPointerException("type == null");
134134 }
--- a/dx/src/com/android/dx/merge/DexMerger.java
+++ b/dx/src/com/android/dx/merge/DexMerger.java
@@ -28,6 +28,7 @@ import com.android.dex.ProtoId;
2828 import com.android.dex.SizeOf;
2929 import com.android.dex.TableOfContents;
3030 import com.android.dex.TypeList;
31+
3132 import java.io.File;
3233 import java.io.IOException;
3334 import java.util.ArrayList;
@@ -1049,7 +1050,12 @@ public final class DexMerger {
10491050 + contents.methodIds.size * SizeOf.MEMBER_ID_ITEM
10501051 + contents.classDefs.size * SizeOf.CLASS_DEF_ITEM;
10511052 mapList = SizeOf.UINT + (contents.sections.length * SizeOf.MAP_ITEM);
1052- typeList += contents.typeLists.byteCount;
1053+ typeList += fourByteAlign(contents.typeLists.byteCount); // We count each dex's
1054+ // typelists section as realigned on 4 bytes, because each typelist of each dex's
1055+ // typelists section is aligned on 4 bytes. If we didn't, there is a case where each
1056+ // size of both dex's typelists section is a multiple of 2 but not a multiple of 4,
1057+ // and the sum of both sizes is a multiple of 4 but would not be sufficient to write
1058+ // each typelist aligned on 4 bytes.
10531059 stringData += contents.stringDatas.byteCount;
10541060 annotationsDirectory += contents.annotationsDirectories.byteCount;
10551061 annotationsSet += contents.annotationSets.byteCount;
--- a/vm/JarFile.cpp
+++ b/vm/JarFile.cpp
@@ -130,7 +130,8 @@ tryArchive:
130130 * Pre-created .odex absent or stale. Look inside the jar for a
131131 * "classes.dex".
132132 */
133- if ((entry = dexZipFindEntry(&archive, kDexInJarName)) != NULL) {
133+ entry = dexZipFindEntry(&archive, kDexInJarName);
134+ if (entry != NULL) {
134135 bool newFile = false;
135136
136137 /*
Show on old repository browser