The Dalvik Libraries, also known as the Android core libraries, implement general purpose APIs used by code written in the Java programming language. While the libraries themselves don't depend on Android, they do form the foundation of the Android framework. Android applications use the Dalvik libraries both directly and indirectly for data structures, networking, concurrency, I/O, and more.
The Dalvik libraries break down into two categories:
Any system claiming to be Android-compatible must implement these libraries. Unless otherwise noted, both the signatures and the behavior of such a system need to conform to the Android 1.0 reference implementation. Both types of conformance will be checked by the upcoming Android Compatibility Test Suite (CTS).
The VM-specific libraries enable requesting or modifying VM-specific information. Code that uses these classes is only portable across Dalvik-based systems. The VM-specific Dalvik packages include:
This category of library provides a familiar environment for programmers writing code in the Java programming language. Much of the implementation of this code comes from Apache Harmony. Sometimes, we have to change the Harmony code to make it more suitable for the memory and CPU-constrained environments targeted by Dalvik. We delineate Dalvik-specific changes like so:
private static final long serialVersionUID = 8683452581122892189L; // BEGIN android-added /** zero-element array */ private static final Object[] emptyArray = new Object[0]; // END android-added private transient int firstIndex;
If you change existing Harmony code instead of just inserting new code, use
android-changed
instead of android-added
. These
markers help us keep track of our own changes when we pull down updates from
Harmony.
Packages in this category include:
We only provide the core functionality of XMLParser
and
DocumentBuilder
in the XML packages. Some methods dealing with XML
schema were left out because we don't provide the corresponding packages.
In addition to the aforementioned packages, we plan to support the following packages some time in the future. We currently have an unfinished implementation of 2D drawing and image processing.
Copyright © 2008 The Android Open Source Project