diff --git a/Android.mk b/Android.mk index 3902971f0b5b4..3f52948bbaa8e 100644 --- a/Android.mk +++ b/Android.mk @@ -640,6 +640,8 @@ LOCAL_MODULE := ext LOCAL_NO_EMMA_INSTRUMENT := true LOCAL_NO_EMMA_COMPILE := true +LOCAL_DX_FLAGS := --core-library + include $(BUILD_JAVA_LIBRARY) diff --git a/api/12.xml b/api/12.xml index 26469040103b7..f317dc52cdd95 100644 --- a/api/12.xml +++ b/api/12.xml @@ -270265,7 +270265,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/api/current.xml b/api/current.xml index 3c780267a5338..0a57d3e77893b 100644 --- a/api/current.xml +++ b/api/current.xml @@ -267728,7 +267728,7 @@ abstract="true" static="false" final="false" - deprecated="not deprecated" + deprecated="deprecated" visibility="public" > @@ -267739,7 +267739,7 @@ abstract="true" static="false" final="false" - deprecated="not deprecated" + deprecated="deprecated" visibility="public" > @@ -270824,7 +270824,7 @@ - + + + + + + + + + + + + + + + + - + - + @@ -270969,7 +271007,7 @@ - + @@ -270995,26 +271033,13 @@ deprecated="not deprecated" visibility="public" > - + - + - - - - - - - - - - @@ -275886,7 +275896,7 @@ deprecated="not deprecated" visibility="public" > - + @@ -276422,8 +276432,6 @@ > - - - - - - - - - + - + @@ -279140,7 +279142,7 @@ deprecated="not deprecated" visibility="public" > - + - + @@ -279224,7 +279226,7 @@ deprecated="not deprecated" visibility="public" > - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -280598,9 +280600,9 @@ > - + - + @@ -286057,7 +286059,7 @@ deprecated="not deprecated" visibility="public" > - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + + + + + + + + + + + + - + - + @@ -310271,9 +310282,9 @@ deprecated="not deprecated" visibility="protected" > - + - + - + - + - + - + @@ -355502,7 +355513,7 @@ deprecated="not deprecated" visibility="public" > - + + + - - - + + + - - - + - + - + - + - - diff --git a/core/java/android/util/TimeUtils.java b/core/java/android/util/TimeUtils.java index 9042505663572..93299eb8cc66d 100644 --- a/core/java/android/util/TimeUtils.java +++ b/core/java/android/util/TimeUtils.java @@ -19,7 +19,7 @@ package android.util; import android.content.res.Resources; import android.content.res.XmlResourceParser; -import org.apache.harmony.luni.internal.util.ZoneInfoDB; +import libcore.util.ZoneInfoDB; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; diff --git a/core/java/android/util/Xml.java b/core/java/android/util/Xml.java index b0c33e5fca61b..041e8a85aafec 100644 --- a/core/java/android/util/Xml.java +++ b/core/java/android/util/Xml.java @@ -16,23 +16,21 @@ package android.util; -import org.xml.sax.ContentHandler; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; -import org.xml.sax.XMLReader; -import org.xmlpull.v1.XmlPullParser; -import org.xmlpull.v1.XmlSerializer; -import org.xmlpull.v1.XmlPullParserException; -import org.xmlpull.v1.XmlPullParserFactory; - import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.io.StringReader; import java.io.UnsupportedEncodingException; - -import org.apache.harmony.xml.ExpatPullParser; import org.apache.harmony.xml.ExpatReader; +import org.kxml2.io.KXmlParser; +import org.xml.sax.ContentHandler; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; +import org.xml.sax.XMLReader; +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; +import org.xmlpull.v1.XmlPullParserFactory; +import org.xmlpull.v1.XmlSerializer; /** * XML utility methods. @@ -46,7 +44,7 @@ public class Xml { * @see * specification */ - public static String FEATURE_RELAXED = ExpatPullParser.FEATURE_RELAXED; + public static String FEATURE_RELAXED = "http://xmlpull.org/v1/doc/features.html#relaxed"; /** * Parses the given xml string and fires events on the given SAX handler. @@ -57,8 +55,7 @@ public class Xml { XMLReader reader = new ExpatReader(); reader.setContentHandler(contentHandler); reader.parse(new InputSource(new StringReader(xml))); - } - catch (IOException e) { + } catch (IOException e) { throw new AssertionError(e); } } @@ -88,16 +85,17 @@ public class Xml { } /** - * Creates a new pull parser with namespace support. - * - *

Note: This is actually slower than the SAX parser, and it's not - * fully implemented. If you need a fast, mostly implemented pull parser, - * use this. If you need a complete implementation, use KXML. + * Returns a new pull parser with namespace support. */ public static XmlPullParser newPullParser() { - ExpatPullParser parser = new ExpatPullParser(); - parser.setNamespaceProcessingEnabled(true); - return parser; + try { + KXmlParser parser = new KXmlParser(); + parser.setFeature(XmlPullParser.FEATURE_PROCESS_DOCDECL, true); + parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true); + return parser; + } catch (XmlPullParserException e) { + throw new AssertionError(); + } } /** diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index 32ddc2203ea84..9b71a8b8b3547 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -254,7 +254,7 @@ public class ZygoteInit { runtime.setTargetHeapUtilization(0.8f); // Start with a clean slate. - runtime.gcSoftReferences(); + System.gc(); runtime.runFinalizationSync(); Debug.startAllocCounting(); @@ -281,7 +281,7 @@ public class ZygoteInit { Log.v(TAG, " GC at " + Debug.getGlobalAllocSize()); } - runtime.gcSoftReferences(); + System.gc(); runtime.runFinalizationSync(); Debug.resetGlobalAllocSize(); } @@ -329,7 +329,7 @@ public class ZygoteInit { Debug.startAllocCounting(); try { - runtime.gcSoftReferences(); + System.gc(); runtime.runFinalizationSync(); mResources = Resources.getSystem(); mResources.startPreloading(); @@ -365,7 +365,7 @@ public class ZygoteInit { if (Config.LOGV) { Log.v(TAG, " GC at " + Debug.getGlobalAllocSize()); } - runtime.gcSoftReferences(); + System.gc(); runtime.runFinalizationSync(); Debug.resetGlobalAllocSize(); } @@ -388,7 +388,7 @@ public class ZygoteInit { if (Config.LOGV) { Log.v(TAG, " GC at " + Debug.getGlobalAllocSize()); } - runtime.gcSoftReferences(); + System.gc(); runtime.runFinalizationSync(); Debug.resetGlobalAllocSize(); } @@ -419,11 +419,11 @@ public class ZygoteInit { /* runFinalizationSync() lets finalizers be called in Zygote, * which doesn't have a HeapWorker thread. */ - runtime.gcSoftReferences(); + System.gc(); runtime.runFinalizationSync(); - runtime.gcSoftReferences(); + System.gc(); runtime.runFinalizationSync(); - runtime.gcSoftReferences(); + System.gc(); runtime.runFinalizationSync(); } diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index 25c0a13b0cf31..2a11c87fc24c8 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -699,6 +699,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv) case 'n': val = "-Xdexopt:none"; break; case 'v': val = "-Xdexopt:verified"; break; case 'a': val = "-Xdexopt:all"; break; + case 'f': val = "-Xdexopt:full"; break; default: val = NULL; break; } diff --git a/core/tests/coretests/Android.mk b/core/tests/coretests/Android.mk index b49680506802f..b02d9044bd4da 100644 --- a/core/tests/coretests/Android.mk +++ b/core/tests/coretests/Android.mk @@ -12,7 +12,7 @@ LOCAL_SRC_FILES := \ $(call all-java-files-under, EnabledTestApp/src) LOCAL_DX_FLAGS := --core-library -LOCAL_STATIC_JAVA_LIBRARIES := core-tests-supportlib android-common frameworks-core-util-lib +LOCAL_STATIC_JAVA_LIBRARIES := core-tests android-common frameworks-core-util-lib LOCAL_JAVA_LIBRARIES := android.test.runner LOCAL_PACKAGE_NAME := FrameworksCoreTests diff --git a/core/tests/systemproperties/Android.mk b/core/tests/systemproperties/Android.mk index 05216e0d432e6..9f01a28fd332f 100644 --- a/core/tests/systemproperties/Android.mk +++ b/core/tests/systemproperties/Android.mk @@ -9,7 +9,7 @@ LOCAL_SRC_FILES := \ $(call all-java-files-under, src) LOCAL_DX_FLAGS := --core-library -LOCAL_STATIC_JAVA_LIBRARIES := core-tests-supportlib android-common frameworks-core-util-lib +LOCAL_STATIC_JAVA_LIBRARIES := core-tests android-common frameworks-core-util-lib LOCAL_JAVA_LIBRARIES := android.test.runner LOCAL_PACKAGE_NAME := FrameworksCoreSystemPropertiesTests diff --git a/test-runner/src/android/test/ClassPathPackageInfoSource.java b/test-runner/src/android/test/ClassPathPackageInfoSource.java index 877075f2d2af9..7b4e793ab6399 100644 --- a/test-runner/src/android/test/ClassPathPackageInfoSource.java +++ b/test-runner/src/android/test/ClassPathPackageInfoSource.java @@ -119,22 +119,12 @@ public class ClassPathPackageInfoSource { try { if (entryName.endsWith(".apk")) { findClassesInApk(entryName, packageName, classNames, subpackageNames); - } else if ("true".equals(System.getProperty("android.vm.dexfile", "false"))) { - // If the vm supports dex files then scan the directories that contain - // apk files. + } else { + // scan the directories that contain apk files. for (String apkPath : apkPaths) { File file = new File(apkPath); scanForApkFiles(file, packageName, classNames, subpackageNames); } - } else if (entryName.endsWith(".jar")) { - findClassesInJar(classPathEntry, pathPrefix, - classNames, subpackageNames); - } else if (classPathEntry.isDirectory()) { - findClassesInDirectory(classPathEntry, packagePrefix, pathPrefix, - classNames, subpackageNames); - } else { - throw new AssertionError("Don't understand classpath entry " + - classPathEntry); } } catch (IOException e) { throw new AssertionError("Can't read classpath entry " +